#include <bits/stdc++.h>

using namespace std;

vector<int> arr;
vector<int> li;

void win()
{
    cout << "Ready!" << endl;
    cout << li.size() << endl;
    for (int i : arr)
        cout << i + 1 << " ";
    cout << endl;
}

//#define DEBUG

#ifdef DEBUG

vector<int> arr2;

struct start
{
    start()
    {
        int n;
        cin >> n;
        arr2.resize(n);
        for (int &i : arr2)
            cin >> i;
    }
} debug;

int req(int l, int r)
{
    set<int> s;
    for (int i = l; i <= r; i++)
        s.insert(arr2[i]);
    cerr << "? " << l << " " << r << "\n" << s.size() << "\n";
    return s.size();

}

#else // DEBUG

int req(int l, int r)
{
    cout << "? " << l + 1 << " " << r + 1 << endl;
    int ret;
    cin >> ret;
    return ret;
}

#endif

int main()
{
    int n;
    cin >> n;
    li.resize(1, 0);
    arr.resize(1, 0);
    for (int t = 1; t < n; t++)
    {
        int d = li.size();
        pair<int, int> lic[d];
        for (int i = 0; i < d; i++)
        {
            lic[i] = make_pair(li[i], i);
        }
        sort(lic, lic + d);
        int L = 0, R = d;
        while(R - L > 1)
        {
            int M = (R + L) / 2;
            if (req(lic[M].first, t) == d - M)
                L = M;
            else
                R = M;
        }
        if (L == 0 && req(0, t) > d)
        {
            arr.push_back(li.size());
            li.push_back(t);
        }
        else
        {
            int c = lic[L].second;
            arr.push_back(c);
            li[c] = t;
        }
    }
    win();
    return 0;
}
