#include using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; vector ret(n); for (int i = 0; i < n; i++) ret[i] = i + 1; for (int i = 0; i < 2 * n; i++) { cout << "?"; int m = n; for (int j = i % 2; j + 1 < n; j += 2) { cout << " " << ret[j] << " " << ret[j+1]; --m; } while (m--) cout << " " << 0 << " " << 0; cout << endl; cout.flush(); m = n; for (int j = i % 2; j + 1 < n; j += 2) { char x; cin >> x; if (x == '>') swap(ret[j], ret[j+1]); --m; } while (m--) { char _; cin >> _; } } cout << "!"; for (int x: ret) cout << " " << x; cout << endl; cout.flush(); return 0; }