//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<n; ++i)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
using namespace std;
using ll = int64_t;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vi>;

int main() {
    int n;
    cin >> n;

    int a, b, c;
    a = 0;
    b = n/2;
    c = n;
    vector<char> st;
    printf("%d\n", 0);
    fflush(stdout);
    string S;
    cin >> S;
    if(S[0] == 'V') return 0;
    st.push_back(S[0]);

    printf("%d\n", b);
    fflush(stdout);
    cin >> S;
    if(S[0] == 'V') return 0;
    st.push_back(S[0]);

    rep(i, 18) {
        if((((b-a)&1) && st[0] != st[1]) || (!((b-a)&1) && st[0] == st[1])) {
            a = b;
            b = (c+b)/2;
            st[0] = st[1];
        } else {
            c = b;
            b = (c+a)/2;
        }
        printf("%d\n", b);
        fflush(stdout);
        cin >> S;
        if(S[0] == 'V') return 0;
        st[1] = S[0];
    }

}
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define ALL(x) (x).begin(), (x).end()
typedef long long ll;
typedef pair<int, int> pii;
const double EPS = 1e-10;
const int INF = 1e9;
const ll LINF = 1e15;
const int MOD = 1000000007;
const double PI = acos(-1);
int dx[4] = {0,1,0,-1};
int dy[4] = {1,0,-1,0};

int main() {
	int n;
	cin >> n;
	cout << 0 << endl;
	string s;
	cin >> s;
	if (s == "Vacant") return 0;
	vector<string> v(n);
	v[0] = s;
	int l = 0;
	int r = n;
	int p = (l+r)/2;
	cout << p << endl;
	while (cin >> s, s != "Vacant") {
		v[p] = s;
		int x = p - l - 1;
		int y = r - p - 1;
		if ((v[l] == s && x % 2 == 0) || (v[l] != s && x % 2 == 1)) {
			r = p;
			p = (l+r)/2;
		} else {
			l = p;
			p = (l+r)/2;
		}
		cout << p << endl;
	}
}