#include<bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<int> ans(n);
    ans[0] = 1;
    int next = 2;
    for (int i = 1; i < n; i++)
    {
        set <int> was;
        vector<int> dp(i);
        for (int j = i - 1; j >= 0; j--)
        {
            if (was.count(ans[j]) == 0)
            {
                was.insert(ans[j]);
                //cout << "? " << j + 1 << " " << i + 1 << endl;
                //int result;
                //cin >> result;
                //if (result == was.size())
                //{
                //    ans[i] = ans[j];
                //    break;
                //}
            }
            dp[j] = was.size();
        }
        int r = i + 1;
        int l = -1;
        while (r - l > 1)
        {
            int mid = (r + l) / 2;
            cout << "? " << mid + 1 << " " << i + 1 << endl;
            int result;
            cin >> result;
            if (result == dp[mid])
            {
                l = mid;
            }
            else
            {
                r = mid;
            }
        }
        if (ans[i] == 0)
        {
            ans[i] = next;
            next++;
        }
    }
    cout << "Ready!" << endl;
    cout << next - 1 << endl;
    for (int i = 0; i < n; i++)
    {
        cout << ans[i] << " ";
    }
}
