/*
* Author: Geeza
*/


#include <bits/stdc++.h>

#define ld long double
#define ll long long
#define pb push_back
#define fin(a, n) for(int i = a; i < n; i++)
#define fjn(a, n) for(int j = a; j < n; j++)
#define all(a) a.begin(),a.end()
#define allr(a) a.rbegin(),a.rend()
#define FAST ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)

using namespace std;

const double PI = acos(-1);
const int N = 1e5 + 10, M = 1e3 + 10, LOG = 20;
const ll oo = 0x3f3f3f3f3f3f3f3f;
const int mod = 998244353, inf = 1e6;
const ld EPS = 1e-9;

string di[] = {"D", "L", "U", "R", "UL", "UR", "DL", "DR"};
int dx[] = {+1, +0, +0, -1, -1, -1, +1, +1};
int dy[] = {+0, -1, +1, +0, -1, +1, -1, +1};
char dc[] = {'D', 'L', 'R', 'U'};

int n;
vector<int> ans;
vector<vector<char>> chars;

char ask(int i, int j) {
    if (chars[i][j] != '&') return chars[i][j];
    cout << "? " << i << " " << j << endl;
    cout.flush();
    char c; cin >> c;
    chars[i][j] = c;
    return c;
}

void solve(vector<int> &nuts, vector<int> &bolts) {
    if (nuts.empty()) return;
    if (nuts.size() == 1) {
        ans[nuts[0]] = bolts[0];
        return;
    }

    int r = rand() % nuts.size();
    swap(nuts[0], nuts[r]);

    vector<int> big, small;
    int same = -1;
    for (int b : bolts) {
        char c = ask(nuts[0], b);

        if (c == '<') big.push_back(b);
        else if (c == '>') small.push_back(b);
        else same = b, ans[nuts[0]] = b;
    }

    vector<int> small2, big2;
    for (int i = 0; i < nuts.size(); i++) {
        char c = ask(nuts[i], same);
        if (c == '=') continue;
        if (c == '>') big2.push_back(nuts[i]);
        else small2.push_back(nuts[i]);
    }
    solve(small2, small);
    solve(big2, big);
}

void solve() {
    cin >> n;
    ans.assign(n+1, 0);
    vector<int> nuts, bolts;
    for (int i = 1; i <= n; i++) nuts.pb(i), bolts.pb(i);
    chars = vector<vector<char>>(n+1, vector<char>(n+1, '&'));
    solve(nuts, bolts);
    cout << "! ";
    for (int i = 1; i <= n; i++) cout << ans[i] << " ";
    cout << endl;
}

int main() {
    FAST;
// #ifndef ONLINE_JUDGE
//     freopen("input.txt", "r",stdin);
//     freopen("output.txt", "w",stdout);
// #endif
    int tt = 1, c = 1; //cin >> tt;
    while (tt--) {
        // cout << "Case " << c++ << ":\n";
        solve();
    }
    return 0;
}