#include <bits/stdc++.h>

using namespace std;

pair<int, int> prev[300];
int a[300];

int main()
{
    int last = 0;
    int n;
    cin >> n;
    if (n == 1){
        cout << "Ready\n" << 1 << '\n' << 1 << endl;
        return 0;
    }
    cout << "? " << 1 << ' ' << 2 << endl;
        int x;
        cin >> x;
        if (x == 2){
            prev[0] = {0, 0};
            prev[1] = {1, 1};
            a[0] = 0;
            a[1] = 1;
            last = 2;
        }
        else{
            prev[0] = {1, 0};
            a[0] = a[1] = 0;
            last = 1;
        }

    for (int i = 2; i < n; i++){
        sort(prev, prev + last);
        bool fl = 0;
        for (int it = last - 1; it >= 0; it--){
            cout << "? " << prev[it].first + 1 << ' ' << i + 1 << endl;
            cin >> x;
            if (x == last - 1 - it + 1){
                a[i] = prev[it].second;
                prev[it].first = i;
                fl = 1;
                break;
            }
        }
        if (!fl){
            last++;
            a[i] = last - 1;
            prev[last - 1] = {i, last - 1};
        }
    }

    cout << "Ready\n" << 1 << '\n' << last << endl;
    for (int i = 0; i < n ; i++)
            cout << a[i] + 1 << ' ';
    cout << endl;

    return 0;
}
