#include <bits/stdc++.h>
using namespace std;

const int maxn = 3005;
int n, k;
int a[maxn];
bool was[maxn];
int x, c;

int main() {
    ios_base::sync_with_stdio(false);
    cin >> n;
    a[1] = 1;
    cout << "? 1 " << n << endl;
    cin >> k;
    int ck = 1;
    for (int i = 2; i <= n; ++i) {
        cout << "? 1 " << i << endl;
        cin >> x;
        if (x > ck) {
            ck = x;
            a[i] = ck;
            continue;
        }
        int l = 1, r = i;
        while (l != r - 1) {
            int m = (l + r) / 2;
            cout << "? " << m << ' ' << i << endl;
            cin >> x;
            memset(was, 0, sizeof(int) * maxn);
            c = 0;
            for (int j = m; j <= i - 1; ++j)
                if (!was[a[j]]) {
                    ++c;
                    was[a[j]] = true;
                }
            if (x == c)
                l = m;
            else
                r = m;
        }
        a[i] = a[l];
    }
    cout << "Ready!" << endl;
    cout << k << endl;
    for (int i = 1; i <= n; ++i)
        cout << a[i] << ' ';;
    cout << endl;
    return 0;
}
