#include<iostream>
#include<fstream>
#include<algorithm>
#include<cstring>
#include<vector>
#include<string>
#include<queue>
#include<cstdlib>
#include<ctime>
#define in cin
#define out cout
#define abs(x) ((x>0)?(x):(-(x)))
#define max(a,b) ((a)>(b)?(a):(b))
#define min(a,b) ((a)<(b)?(a):(b))
#define FOR(i, a, b) for(int i = a; i <= b; ++i)
#define DOWNFOR(i, a, b) for(int i = a; i >= b; --i)
#define FOREACH(i, t) for (typeof(t.begin()) i = t.begin(); i != t.end(); ++i)
using namespace std;
typedef long long ll;
int main(){
    #ifndef ONLINE_JUDGE
    ifstream in("test.in");
    ofstream out("test.out");
    #endif
    int sureAboutAnswer=0;
    int n,k,i=0,pas=(1<<10);
    cin>>n>>k; //read the number of stories and eggs
    string response;
    while(response != "exit") {
        int x=i+pas;
        cout << "query " << x << "\n"; //can also use endl for newline
        cout.flush();

        cin >> response;
        if(response == "broke"){
            k--;
        }
        else i+=pas;
        if(pas==1) sureAboutAnswer=1;

        if(!sureAboutAnswer) { //perhaps you need more information
            cout << "query " << x << "\n";
            cout.flush();

            cin >> response;
            if(response == "broke") k--;
        }
        else { //in case you've found the answer
            int x=i+1;
            cout << "answer " << x << "\n";
            cout.flush();
            cin >> response; //the response is going to be "exit"
        }
        pas>>=1;
    }
    return 0;
}