#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define popcount __builtin_popcount using namespace std; typedef long long int ll; typedef pair P; int main() { int n; cin>>n; int d=1; while(d*d v[20]; for(int i=1; i<=n; i++){ v[i%d].push_back(i); } int mxb[20]; int ret; for(int i=0; i>ret; if(ret==v[i][j]) mxb[i]=v[i][j]; } } int mx=mxb[0], mx2=mxb[1]; int mxi=0; cout<<"? "<>ret; if(ret==mxb[1]){ swap(mx, mx2); mxi=1; } for(int i=2; i>ret; if(ret==mx2) continue; cout<<"? "<>ret; if(ret==mxb[i]){ mx2=mx; mx=mxb[i]; mxi=i; }else{ mx2=mxb[i]; } } cout<<"! "<