#include using namespace std; random_device rnd; mt19937 mt(rnd()); int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; int query = 12000; auto ask = [&](vector A) -> int { query--; assert(query >= 0); cout << "?"; for(auto a : A) cout << " " << a; cout << endl; int ret; cin >> ret; if(ret == -1) assert(false); return ret; }; auto ans = [&](vector P) -> void { cout << "!"; for(auto a : P) cout << " " << a+1; cout << endl; exit(0); }; auto check = [&](vector &A,int L,int M,int R) -> vector { vector ret; int pos = L,pos2 = M; while(pos != M && pos2 != R){ vector B(N,2); int p1 = A.at(pos),p2 = A.at(pos2); B.at(p1) = 0,B.at(p2) = 1; if(ask(B) == 3) ret.push_back(p1),pos++; else ret.push_back(p2),pos2++; } while(pos != M) ret.push_back(A.at(pos++)); while(pos2 != R) ret.push_back(A.at(pos2++)); return ret; }; auto merge = [&](auto merge,vector &A,int L = -1,int R = -1) -> void { if(L == -1 && R == -1) L = 0,R = A.size(); if(R-L <= 1) return; int M = (L+R)/2; merge(merge,A,L,M); merge(merge,A,M,R); vector Ls,Rs; for(int i=L; i P(N),X(N,1); for(int i=0; i