#include <bits/stdc++.h>

using namespace std;

void recalc_suf(vector<int>& ans, int now, vector<int>& suf, int end)
{
    vector<char> used(now+1, 0);
    suf[end] = 0;
    for (int i = end; i; --i)
    {
        suf[i-1] = suf[i];
        if (!used[ans[i-1]])
            suf[i-1] += 1,
            used[ans[i-1]] = true;
    }
}

void solve()
{
    int n;
    cin >> n;
    vector<int> ans(n, 0);
    vector<int> suf(n, 0);

    int k;
    cout << "? 1 " << n << endl;
    cin >> k;

    ans[0] = 1;

    int now = 1;
    for (int it = 1; it < n; ++it)
    {
        recalc_suf(ans, now, suf, it);
        int a;
        int l = -1;
        int r = it;
        while (r-l > 1)
        {
            int mid = (l+r+1)/2;
            //cerr << l << ' ' << mid << ' ' << r << endl;
            cout << "? " << mid+1 << ' ' << it+1 << endl;
            cin >> a;
            if (a != suf[mid])
                l = mid;
            else
                r = mid;
        }
        if (r == it)
            ans[it] = ++now;
        else
            ans[it] = ans[r];
    }

    assert(now == k);

    cout << "Ready!" << endl;
    cout << k << endl;
    for (int& it : ans)
        cout << it << ' ';


}

int main()
{
    ios_base::sync_with_stdio(false);

    solve();

    return 0;
}
