#include <bits/stdc++.h>

using namespace std;

int n;
int ans[3000];
int cnt[3000][3000];
int id[3000];

int print(int i, int j) {
    if (cnt[i][j] != -1) {
        return cnt[i][j];
    }
    cout << "? " << i + 1 << " " << j + 1 << endl;
    int t;
    cin >> t;
    return cnt[i][j] = t;
}

int main() {
    cin >> n;
    ans[0] = 1;
    for (int i = 1; i < n; i++) {
        ans[i] = -1;
    }
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            cnt[i][j] = -1;
        }
    }
    int k = 1;
    for (int i = 1; i < n; i++) {
        if (print(0, i) > k) {
            k++;
            ans[i] = k;
        }
    }
    for (int i = 0; i < n; i++) {
        if (ans[i] != -1) {
            continue;
        }
        set<int> s;
        int k = print(0, i);
        for (int j = i - 1; j >= 0; j--) {
            if (s.find(ans[j]) == s.end()) {
                id[k - 1 - (int) s.size()] = j;
            }
        }
        int L = 0;
        int R = k;
        while (R - L > 1) {
            int M = (R + L) / 2;
            int t = print(id[M], i);
            if (k - M == t) {
                L = M;
            } else {
                R = M;
            }
        }
        ans[i] = ans[id[L]];
    }
    cout << "Ready!" << endl;
    cout << print(0, n - 1) << endl;
    for (int i = 0; i < n; i++) {
        cout << ans[i] << " ";
    }
    cout << endl;
}
