#include<bits/stdc++.h>
 
using namespace std;
 
int n;
string s, c;
 
int main () {
    cin >> n;
    cout << 0 << '\n';
    cout.flush();
    cin >>s;
    if(s == "Vacant") {
        cout << 0 << '\n';
        fflush(stdout);
    }
    else {
        int l = 1, r = n - 1;
        while(l < r) {
            int mid = l + r >> 1;
            cout << mid << '\n';
            fflush(stdout);
            cin >> c;
            if(c == "Vacant") {
                cout << mid << '\n';
                fflush(stdout);
                return 0;
            }
            string rem;
            if(mid % 2 == 0) rem = s;
            else {
                if(s == "Male") rem = "Female";
                else rem = "Male";
            }
            if(c == rem) l = mid + 1;
            else r = mid;
        }
        cout << l << '\n';
        fflush(stdout);
    }
}