#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; long long gcd(long long x,long long y){ return y==0?x:gcd(y,x%y); } int main(){ int n; cin>>n; set s; vector ans; for(int i=0;i>a[i]; } while(!s.empty()){ /* cout<<"s=["; for(auto it=s.begin();it!=s.end();it++) cout<<(*it)<<" "; cout<<"]"< heavy(s.begin(),s.end()); while(true){ while(heavy.size()!=2*n) heavy.push_back(0); cout<<"?"; for(int i=0;i result(n); int cnt=0; for(int i=0;i>result[i]; if(result[i]!="=") cnt++; } if(cnt==1){ if(result[0]==">"){ ans.push_back(heavy[0]); if(heavy[1]!=0) ans.push_back(heavy[1]); }else{ ans.push_back(heavy[1]); if(heavy[0]!=0) ans.push_back(heavy[0]); } s.erase(heavy[0]); s.erase(heavy[1]); break; } vector next_h; for(int i=0;i") next_h.push_back(heavy[2*i]); else if(result[i]=="<") next_h.push_back(heavy[2*i+1]); } swap(heavy,next_h); } } cout<<"!"; for(int i=n-1;i>=0;i--) cout<<" "<