#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 1000000000000000001 bool query(int i,int x,int j,int y){ cout<<"? "<>s; return s=="Yes"; } int main(){ int n; cin>>n; int ii; if(query(1,2*n,2,2*n)){ if(query(2,2*n,3,2*n))ii = 3; else ii = 2; } else{ if(query(1,2*n,3,2*n))ii = 3; else ii = 1; } vector ans; vector rem(3,n*2); rep(i,n){ for(int j=1;j<=3;j++){ if(j==ii)continue; ans.push_back(j); rem[j-1]--; } } int jj; if(ii==1){ if(!query(2,n,3,n))jj = 3; else jj = 2; } else if(ii==2){ if(!query(1,n,3,n))jj = 3; else jj = 1; } else{ if(!query(1,n,2,n))jj = 2; else jj = 1; } rep(i,n){ ans.push_back(ii); ans.push_back(jj); } rep(i,n){ ans.push_back(ii); ans.push_back(ii^jj); } reverse(ans.begin(),ans.end()); cout<<"!"; rep(i,ans.size()){ cout<<' '<