#include <bits/stdc++.h>
using namespace std;
#include <math.h>
#include <iomanip>
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

const int mod=1000000007;
const int INF=1001001001;

int main() {
  int N;
  cin>>N;
  cout<<0<<endl;
  string start;
  cin>>start;
  string vac="Vacant";
  if(start==vac){cout<<0<<endl;return 0;}
  int l=0,r=N;
  while(r-l>1){
    int mid=(l+r)/2;
    cout<<mid<<endl;
    string next;
    cin>>next;
    if(next==vac){cout<<mid<<endl;return 0;}
    else if(mid%2==l%2){
      if(next!=start){r=mid;}
      else{l=mid;start=next;}
    }
    else {
      if(next==start){r=mid;}
      else{l=mid;start=next;}
    }
  }

  return 0;  
}
#include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i<(int)(n); i++)
#define all(v) v.begin(), v.end()
#define allR(v) v.rbegin(), v.rend()
#define PRINT(v) for (auto x : (v)) cout <<x <<" " ; cout <<endl;
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
typedef pair<int,int> Pi;
const ll MOD = 1000000007;
const ll INF = 10000000000000000;
const int inf = 1001001001;
vector<int> x4 = {0, 1, 0, -1}, x8 = {0, 1, 1, 1, 0, -1, -1, -1};
vector<int> y4 = {1, 0, -1, 0}, y8 = {1, 1, 0, -1, -1, -1, 0, 1};
template<class T> inline bool chmin(T& a, T b){if (a>b){a = b; return true;}return false;}
template<class T> inline bool chmax(T& a, T b){if (a<b){a = b; return true;}return false;}
template<class T> inline T powerM(T a,T b){if (b==0) return 1;
T tmp = powerM(a,b/2); if (b%2==0) return tmp*tmp%MOD; else return tmp*tmp%MOD*a%MOD; }
template<class T> inline T power(T a,T b,T m=numeric_limits<T>::max()){ if (b==0) return 1;
  T tmp = power(a,b/2,m); if (b%2==0) return tmp*tmp%m; else return tmp*tmp%m*a%m; }
template<class T> inline T gcd(T a, T b){if (b==0) return a; return gcd(b, a%b);}
template<class T> inline T lcm(T a, T b){return a / gcd(a,b) * b;}
// ax+by=gcd(a,b)を解く
template<class T> inline T extgcd(T a,T b,T &x,T &y){if (b==0){x=1; y=0; return a;} T d=extgcd(b,a%b,y,x); y -= a/b*x; return d;}
void hey(){ cout <<"hey" <<endl; }

template<class T> struct edge { int to; T cost;};


int main() {
  int N; cin >>N;
  vector<int> seat(N+1, -1);
  // 0: Male, 1: Female
  cout <<0 <<endl;
  fflush(stdout);
  string s; cin >>s;
  if (s == "Vacant") return 0;
  seat[0] = s == "Male" ? 0 : 1;
  seat[N] = s == "Male" ? 0 : 1;
  int ai = 0, bi = N;
  for (int qq=1; qq<20; qq++){
    int ci = (ai+bi)/2;
    cout <<ci <<endl;
    fflush(stdout);
    cin >>s;
    if (s == "Vacant") return 0;
    seat[ci] = s == "Male" ? 0 : 1;
    if ((seat[ai]^seat[ci]) != abs((ai-ci)%2)){
      bi = ci;
    }else{
      ai = ci;
    }
  }
}
