#include using namespace std; using i64 = int64_t; using vi = vector; using vvi = vector; int main() { int n; cin >> n; vvi res(n, vi(n)); int N = n; deque ord; for (int i = 1; i < n; i++) { ord.push_back(i); } if (n % 2) { ord.push_back(-1); n++; } reverse(ord.begin() + (n - 1) / 2, ord.end()); for (int i = 0; i < n - 1; i++) { vvi match(n / 2, vi(2)); match[0][0] = 0; int j = 1; for (int k: ord) { if (j < n / 2) { match[j][0] = k; } else { match[n - 1 - j][1] = k; } j++; } cout << "?"; for (int i = 0; i < n / 2; i++) { if (match[i][0] == -1 || match[i][1] == -1) { cout << " 0 0"; } else { cout << " " << match[i][0] + 1 << " " << match[i][1] + 1; } } for (int i = 0; i < N - n / 2; i++) { cout << " 0 0"; } cout << endl; char ch; for (int i = 0; i < n / 2; i++) { cin >> ch; if (match[i][0] == -1 || match[i][1] == -1) { assert(ch == '='); } else { assert(ch != '='); if (ch == '>') { res[match[i][0]][match[i][1]] = 1; } else { res[match[i][1]][match[i][0]] = 1; } } } for (int i = 0; i < N - n / 2; i++) { cin >> ch; } ord.push_back(ord.front()); ord.pop_front(); } using ii = pair; vector cnt; for (int i = 0; i < N; i++) { cnt.push_back(ii(accumulate(res[i].begin(), res[i].end(), 0), i)); } sort(cnt.begin(), cnt.end()); cout << "!"; for (int i = 0; i < N; i++) { cout << " " << cnt[i].second + 1; } cout << endl; }