# include<iostream>
# include<cstdio>
# include<map>
# include<string>
# include<stdlib.h>
using namespace std;
map <int,int> mp;
int q(int x)
{
	if(mp.find(x)!=mp.end())  return mp[x];
	printf("%d\n",x);
	fflush(stdout);
	string s;
	cin>>s;
	if(s=="Vacant")  exit(0);
	return  mp[x]=(s=="Male");
}
int main()
{
	int n;
	cin>>n;
	int s=0,e=n-1,mid;
	while(e-s>=2)
	{
		mid=(e+s)/2;
		if((q(mid)^(mid%2))!=(q(s)^(s%2)))  e=mid;
		else  s=mid;
	}
	for(int i=0;i<n;i++)
	  q(i);
	return 0;
} 