#include <iostream>
#include <vector>

using namespace std;

vector<vector<int> > inter;
vector<int> ans;
int n;

bool in(int l, int r) {
    int ans1 = 0;
    int ans2 = 0;
    vector<char> used(n);
    for (int i = l; i <= r; i++) used[ans[i] - 1] = true;
    for (int i = 0; i < n; i++) {
        if (used[i]) ans1++;
    }
    if (inter[l][r + 1] == 0) {
        cout << "? " << l + 1 << " " << r + 2 << endl;
        cin >> ans2;
        inter[l][r + 1] = ans2;
    }
    else {
        ans2 = inter[l][r + 1];
    }
    return ans2 == ans1;
}

int main()
{
    cin >> n;
    inter.resize(n, vector<int>(n));
    ans.resize(n);
    for (int i = 0; i < n; i++) inter[i][i] = 1;
    ans[0] = 1;
    int cnt = 1;
    for (int i = 1; i < n; i++) {
        int l = 0;
        int r = i;
        while (r - l > 1) {
            int mid = (l + r) / 2;
            if (in(mid, i - 1)) {
                l = mid;
            }
            else {
                r = mid;
            }
        }
        if (!in(l, i - 1)) {
            cnt++;
            ans[i] = cnt;
        }
        else {
            ans[i] = ans[l];
        }
    }
    cout << "Ready!" << endl;
    cout << cnt << endl;
    for (int i = 0; i < n; i++) {
        cout << ans[i] << " ";
    }
    cout << endl;
    return 0;
}
