#include "bits/stdc++.h" using namespace std; #define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i)) #define rep(i,j) FOR(i,0,j) #define each(x,y) for(auto &(x):(y)) #define mp make_pair #define all(x) (x).begin(),(x).end() #define debug(x) cout<<#x<<": "<<(x)< pii; typedef vector vi; typedef vector vll; int N; string q1(vi &lr){ printf("?"); rep(i, N*2) printf(" %d", lr[i]); printf("\n"); fflush(stdout); string res; rep(i, N) { char c; cin >> c; res += c; } return res; } void q2(vi &ans){ printf("!"); rep(i, sz(ans))printf(" %d", ans[i]); printf("\n"); fflush(stdout); } int main(){ scanf("%d", &N); vi ans(N); iota(all(ans), 1); rep(iter, 600){ rep(s, 2){ vi Q(N * 2); FOR(i, s, N)Q[i - s] = ans[i]; auto C = q1(Q); for(int i = s, j = 0; i + 1 < N; i += 2, ++j){ char c = C[j]; if(c == '>'){ swap(ans[i], ans[i + 1]); } } } } q2(ans); }