#include using namespace std; int main() { int N,w,p,q,x,t=2; cin>>N; vector> L(N); queue Q; while(N--)Q.push(N); while(t--){ while(Q.size()>1){ p=Q.front(); Q.pop(); q=Q.front(); Q.pop(); cout<<"? "<>x; x--; Q.push(x); L[x].push_back(p+q-x); } w=Q.front(); Q.pop(); for(auto v:L[w])Q.push(v); } cout<<"! "<