#include "bits/stdc++.h" using namespace std; #define REP(i, n) for(int i=0; i<(n); i++) int N,T; signed main() { cin >> N; vector V(N+2, 0); REP(i,N) V[i] = (i+1); REP(l,600) { int d = l % 2; cout << "?"; REP(i,N) { if (2*i+1+d < N) { int a = V[2*i+d]; int b = V[2*i+1+d]; printf(" %d %d", a, b); } else { printf(" 0 0"); } } cout << endl << flush; char op; REP(i,N) { cin >> op; if (op == '>') { swap(V[2*i+d], V[2*i+1+d]); } } } cout << "!"; REP(i,N) { cout << " " << V[i]; } cout << endl << flush; return 0; }