#include <bits/stdc++.h>

using namespace std;

string rdy = "Ready!";
const int MX_SZ = 3042;

void solve1(int n)
{
    if (n == 1)
    {
        cout << rdy << endl;
        cout << 1 << endl;
        cout << 1 << endl;
        return;
    }
    static int a[MX_SZ][MX_SZ];
    for (int i = 1; i <= n; i++)
    {
        a[i][i] = 1;
    }
    for (int i = 1; i <= n; i++)
    {
        for (int j = i + 1; j <= n; j++)
        {
            cout << "? " << i << " " << j << endl;
            cin >> a[i][j];
        }
    }
    static int ans[MX_SZ];
    ans[1] = 1;
    int nw = 2;
    set<int> st;
    for (int i = 2; i <= n; i++)
    {
        if (a[1][i] != a[1][i - 1])
        {
            ans[i] = nw;
            nw++;
        }
        else
        {
            st.clear();
            for (int j = i - 1; j >= 1; j--)
            {
                if (st.find(ans[j]) == st.end())
                {
                    st.insert(ans[j]);
                    if (a[j][i] == (int)st.size())
                    {
                        ans[i] = ans[j];
                        break;
                    }
                }
            }
        }
    }
    cout << rdy << endl;
    cout << a[1][n] << endl;
    for (int i = 1; i <= n; i++)
    {
        cout << ans[i] << " ";
    }
}

int main()
{
    cout.flush();
    int n;
    cin >> n;

    if (n <= 300)
    {
        solve1(n);
    }

    else
    {
        int cnt = 0;
        static int ans[MX_SZ];
        ans[1] = 1;
        static int last[MX_SZ];
        memset(last, -1, sizeof(last));
        last[1] = 1;
        int prv = 1;
        int nw = 2;
        for (int i = 2; i <= n; i++)
        {
            cout << "? " << 1 << " " << i << endl;
            int t;
            cin >> t;
            cnt++;
            if (t != prv)
            {
                ans[i] = nw;
                last[nw] = i;
                nw++;
            }
            else
            {
                pair<int, int> nlast[MX_SZ];
                for (int j = 0; j < MX_SZ; j++)
                {
                    nlast[j].first = last[j];
                    nlast[j].second = j;
                }
                sort(nlast, nlast + MX_SZ);
                reverse(nlast, nlast + MX_SZ);
                int l = -1, r; //l - точно не достигается, r - точно достигается
                for (int j = 0; j < MX_SZ; j++)
                {
                    if (nlast[j].first != -1)
                    {
                        r = j;
                    }
                }
                while (l + 1 < r)
                {
                    int m = (l + r) / 2;
                    cout << "? " << nlast[m].first << " " << i << endl;
                    int tt;
                    cin >> tt;
                    cnt++;
                    if (tt == m + 2)
                    {
                        l = m;
                    }
                    else
                    {
                        r = m;
                    }
                }
                ans[i] = nlast[r].second;
                last[nlast[r].second] = i;
                /*
                for (int j = 0; j <= 10; j++)
                {
                    if (nlast[j].first == -1)
                    {
                        break;
                    }
                    cout << "? " << nlast[j].first << " " << i << endl;
                    int tt;
                    cin >> tt;
                    if (tt != cnt + 1)
                    {
                        ans[i] = nlast[j].second;
                        last[nlast[j].second] = i;
                        break;
                    }
                    cnt++;
                }
                */
            }
            prv = t;
            assert(cnt < 60000);
        }
        int ttl;
        cout << "? " << 1 << " " << n << endl;
        cin >> ttl;
        cout << rdy << endl;
        cout << ttl << endl;
        for (int i = 1; i <= n; i++)
        {
            cout << ans[i] << " ";
        }
    }
}
