#include #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define FFOR(i,a,b) for(int i=(a);i<=(b);i++) #define REP(i,b) FOR(i,0,b) #define RREP(i,b) FFOR(i,1,b) #define PB push_back #define F first #define S second #define BE(c) c.begin(),c.end() using namespace std; typedef long long LL; typedef int ut; typedef long double ld; typedef pair pr; typedef vector Vpr; typedef vector VI; typedef pair ppr; typedef vector Vppr; typedef priority_queue > PQ; typedef priority_queue > PprQ; const int SIZE=5+3*1e+5; const LL INF=1LL<<60; const ld eps=1e-6; const LL p=7+1e+9; int nums[SIZE]; int N; bool pred(const int& a,const int& b){ string s; s+=("? "); s+=a+'0'; s+=(" "); s+=b+'0'; REP(i,N-1) s+=" 0 0"; cout << s << endl; cin >> s; cin.ignore(N*2-2); return s[0]=='<'; } int main(){ cin >> N; REP(i,N+1) nums[i]=i; sort(nums+1,nums+N+1,pred); cout << "!"; FOR(i,1,N+1) cout << " " << nums[i]; cout << endl; return 0; }