#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector> tb(n); for(int i = 0; i < n; i++) tb[i].push_back(i); while(tb.size() >= 2){ vector> nxt((tb.size() + 1) / 2); if(tb.size() & 1) nxt.back() = tb.back(); bool flag = true; while(flag){ flag = false; vector query(2 * n); for(int i = 0; i + 1 < tb.size(); i += 2){ if(tb[i].empty() || tb[i + 1].empty()){ int to = i / 2; nxt[to].insert(nxt[to].end(), tb[i].begin(), tb[i].end()); nxt[to].insert(nxt[to].end(), tb[i + 1].begin(), tb[i + 1].end()); tb[i].clear(); tb[i + 1].clear(); continue; } flag = true; query[i] = tb[i].front() + 1; query[i + 1] = tb[i + 1].front() + 1; } if(!flag) break; cout << "?"; for(int i = 0; i < 2 * n; i++) cout << " " << query[i]; cout << endl; char c; int cnt = n; for(int i = 0; i + 1 < tb.size(); i += 2){ cin >> c; cnt--; if(tb[i].empty() || tb[i + 1].empty())continue; int to = i / 2; if(c == '='){ nxt[to].push_back(tb[i].front()); nxt[to].push_back(tb[i + 1].front()); tb[i].pop_front(); tb[i + 1].pop_front(); }else if(c == '<'){ nxt[to].push_back(tb[i].front()); tb[i].pop_front(); }else{ nxt[to].push_back(tb[i + 1].front()); tb[i + 1].pop_front(); } } while(cnt--) cin >> c; } swap(tb, nxt); } cout << "!"; for(int i = 0; i < tb[0].size(); i++){ cout << " " << tb[0][i] + 1; } cout << endl; }