#include <iostream>
#include <vector>

using namespace std;
int cnt = 1;
int get(int l, int r) {
    cout << "? " << l << " " << r << endl;
    int ans;
    cin >> ans;
    cnt++;
    return ans;
}


int main() {
    int n, r, nr;
    cin >> n;
    vector<int> ans(n + 1);

    if (n == 1) {
        cout << "Ready!\n1\n1";
        return 0;
    }

    cout << "? 1 2" << endl;
    cin >> r;

    vector<int> same(n + 1);


    int last = 0;
    if (r == 1) {
        ans[1] = 1;
        ans[2] = 1;
        last = 1;

        same[2] = 1;
    } else {
        ans[1] = 1;
        ans[2] = 2;
        last = 2;

    }


    for (int i = 3; i <= n; ++i) {
        cout << "? 1 " << i << endl;
        cnt++;
        cin >> nr;
        same[i] = same[i - 1];

        if (nr != r) {
            ans[i] = last + 1;
            last++;
            r = nr;

        } else {
            int l = 0, r = i;
            while (r - l > 1) {
                int mid = (l + r) / 2;

                if (r - mid + 1 == get(mid, i) + same[i] - same[mid - 1]) {
                    r = mid;
                } else {
                    l = mid;
                }
            }

            ans[i] = ans[r - 1];
            same[i]++;

            r = nr;
        }
    }

    if (cnt > 72000)
        cout << 1/0;

    cout << "Ready!" << endl;
    cout << last << endl;
    for (int i = 1; i <= n; ++i)
        cout << ans[i] << " ";

    return 0;
}
