////////////////////////////////////////////////////////////////////
// This source code is for Visual Studio
////////////////////////////////////////////////////////////////////
#include <iostream>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <sstream>
#include <iterator>
#include <stack>
#include <functional>
#include <iomanip>
#include <string>
#include <cstring>
#include <deque>
#include <math.h>
#include <assert.h>

#define	numberof(a)	(sizeof(a) / sizeof(a[0]))
#define	INF		UINT64_MAX
#define Rep(i,n) for(int i = 0; i < (n); ++i )

using namespace std;

typedef vector< vector<int> > MAT;
typedef pair<int, int> PINT;
typedef long long ll;
typedef uint32_t u32;
typedef uint64_t u64;
typedef int32_t s32;
typedef int64_t s64;

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

enum SEAT_TYPE{
	VACANT = 0,
	MALE,
	FEMALE,
};

int main()
{
	ll N = 0;
	SEAT_TYPE base = VACANT;
	pair<ll, SEAT_TYPE> lastQuery = make_pair(0, VACANT);
	string ans = "";

	cin >> N;

	bool bIsOK = false;
	ll lb = 0;
	ll ub = N;

	// first step
	cout << 0 << endl;		// send query
	cin >> ans;		// answer
	if (ans == "Vacant") {
		base = VACANT;
		bIsOK = true;
	}
	else if (ans == "Male") {
		base = MALE;
	}
	else if (ans == "Female") {
		base = FEMALE;
	}
	lastQuery = make_pair(0, base);

	// Next
	ll cnt = 0;
	while( cnt < 20 && !bIsOK)
	{
		ll mid = (lb + ub) / 2;
		bool type_change = ((abs(mid - lastQuery.first) % 2) == 1);	// 前回クエリを出した席番号と今回クエリを出した席番号が奇数なら席タイプは変わる

		cout << mid << endl;	// send query
		cin >> ans;		// answer

		if (ans == "Vacant") {
			bIsOK = true;
		}
		else if (ans == "Male") {
			if (!type_change) {
				if (lastQuery.second == MALE) {
					// normal, vacant is same flow
					if (mid - lastQuery.first > 0) {
						// plus direction
						lb = mid;
					}
					else {
						ub = mid;
					}
				}
				else {
					// there is vacant between invested area
					if (mid - lastQuery.first > 0) {
						// plus direction, but reverse
						ub = mid;
					}
					else {
						lb = mid;
					}
				}
			}
			else {
				if (lastQuery.second == FEMALE) {
					// normal, vacant is same flow
					if (mid - lastQuery.first > 0) {
						// plus direction
						lb = mid;
					}
					else {
						ub = mid;
					}
				}
				else {
					// there is vacant between invested area
					if (mid - lastQuery.first > 0) {
						// plus direction, but reverse
						ub = mid;
					}
					else {
						lb = mid;
					}
				}
			}
			lastQuery = make_pair(mid, MALE);
		}
		else if (ans == "Female") {
			if (!type_change) {
				if (lastQuery.second == FEMALE) {
					// normal, vacant is same flow
					if (mid - lastQuery.first > 0) {
						// plus direction
						lb = mid;
					}
					else {
						ub = mid;
					}
				}
				else {
					// there is vacant between invested area
					if (mid - lastQuery.first > 0) {
						// plus direction, but reverse
						ub = mid;
					}
					else {
						lb = mid;
					}
				}
			}
			else {
				if (lastQuery.second == MALE) {
					// normal, vacant is same flow
					if (mid - lastQuery.first > 0) {
						// plus direction
						lb = mid;
					}
					else {
						ub = mid;
					}
				}
				else {
					// there is vacant between invested area
					if (mid - lastQuery.first > 0) {
						// plus direction, but reverse
						ub = mid;
					}
					else {
						lb = mid;
					}
				}
			}
			lastQuery = make_pair(mid, FEMALE);
		}

		cnt++;
	}

	return 0;
}



Measured memory_bytes: 852