#include using namespace std; typedef long long ll; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b>N; int can=0; can+=floor(log2(N)*(N-1)); can-=(N-1)/2; can++; vector rem(N);iota(all(rem),1); vector ans; for(int t=0;t1){ int mid=(left+right)/2; vector A=ans; A.push_back(rem[mid]); for(int i=0;i>x; if(x) left=mid; else right=mid; can--; if(can==0){ shuffle(all(rem),rng); for(int x:rem){ ans.push_back(x); } cout<<"!"; for(int a:ans) cout<<" "<