#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; cout<<"? 1 2"<>ret0; int mx, mx2; if(ret0==1) mx=1, mx2=2; else mx=2, mx2=1; for(int i=3; i<=n; i++){ cout<<"? "<>ret; if(ret==i){ mx2=mx; mx=i; continue; } cout<<"? "<>ret; if(ret==i){ mx2=i; } } cout<<"! "<