#include <bits/stdc++.h>
using namespace std;
const int maxn = 400;
int diff[maxn][maxn];
int ans[maxn];

int main() {
    int n;
    cin >> n;
    for (int l = 1; l <= n; ++l) {
        for (int r = l; r <= n; ++r) {
            cout << '?' << ' ' << l << ' ' << r << endl;
            int d;
            cin >> d;
            diff[l][r] = d;
        }
    }
    int k = diff[1][n];
    ans[n] = 1;
    for (int l = n - 1; l >= 1; --l) {
        int r;
        for (r = l + 1; r <= n; ++r) {
            if (diff[l][r] == diff[l + 1][r]) break;
        }
        if (r == n + 1) {
            set<int> s;
            for (int i = 1; i <= k; ++i) s.insert(k);
            for (int i = l + 1; i <= n; ++i) s.erase(ans[i]);
            ans[l] = *s.begin();
        } else {
            ans[l] = ans[r];
        }
    }
    cout << "Ready!" << endl;
    cout << k << endl;
    for (int i = 1; i <= n; ++i) cout << ans[i] << ' ';
    cout << endl;
    return 0;
}
