#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define limit(x,l,r) max(l,min(x,r))
#define lims(x,l,r) (x = max(l,min(x,r)))
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)),x.end())
#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define bn(x) ((1<<x)-1)
#define dup(x,y) (((x)+(y)-1)/(y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef tuple<int,int,int> T;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
typedef vector<T> vt;

int query(int i){
  cout << i <<endl;
  string s;
  cin >> s;
  if(s[0] == 'V')exit(0);
  return (s[0] == 'M');
}
int main() {
  int n;
  cin >> n;

  int l=0,r = n-1;
  int eve = query(l);
  query(r);
  while(true){
    int mid = (l+r)/2;
    int a = query(mid);
    if(mid%2){
      if(a == eve) r = mid;
      else l = mid;
    }else{
      if(a == eve) l = mid;
      else r = mid;
    }
  }
  return 0;
}
#include <iostream>
using namespace std;

void ask(int left, int right, bool male) {
	int mid = (left + right) / 2;
	cout << mid << endl;
	string s;
	cin >> s;
	if (s == "Vacant") return;
	if (((mid - left) % 2 == 0) == (male == (s == "Male"))) ask(left, mid - 1, male);
	else ask(mid + 1, right, s == "Male");
}

int main() {
	int N;
	cin >> N;
	cout << 0 << endl;
	string s;
	cin >> s;
	if (s == "Vacant") return 0;
	ask(1, N - 1, s == "Male");
	return 0;
}