#include using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; template using V=vector; template using VV=V>; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n,q; cin>>n>>q; queue B,S; for(int i=1;i<=n;i+=2){ cout<<"? "<>x; if(x==-1) return 0; if(x==1) B.push(i+1),S.push(i); else B.push(i),S.push(i+1); } while(B.size()>1){ auto a=B.front(); B.pop(); auto b=B.front(); B.pop(); cout<<"? "<>x; if(x==-1) return 0; if(x==1) B.push(b); else B.push(a); } while(S.size()>1){ auto a=S.front(); S.pop(); auto b=S.front(); S.pop(); cout<<"? "<>x; if(x==-1) return 0; if(x==1) S.push(a); else S.push(b); } auto a=B.front(),b=S.front(); cout<<"! "<