#include <iostream>
#include <fstream>
#include <string>

using namespace std;

int main(){
	int n, k, x, up, down;
	string response = "";
	//freopen("input.txt", "r", stdin);
	cin >> n >> k;
	up = n;
	down = 0;
	x = n / 2;
	while(response != "exit"){
		cout << "query " << x << "\n";
		cout.flush();

		cin >> response;
		if(response == "broke"){
			k --;
			up = x-1;
		}
		if(response == "survived")
			down = x;

		if(up == down){
			cout << "answer" << x << '\n';
			cout.flush();
		}

		cin >> response;
	}
	return 0;
}