#include <iostream>
#define MAXN 10000
using namespace std;

int ar[MAXN], n, a, k = 1;

int main()
{
    cin >> n;
    for (int i = 0; i < n - 1; i++)
    {
        cout << i + 1 << ' ' << i + 2 << '\n';
        cout.flush();
        cin >> a;
        if(a == 1)
            ar[i + 1] = ar[i];
        else
        {
            ar[i + 1] = 1 - ar[i];
            k = 2;
        }
    }
    cout << "Ready!\n";
    cout << k << '\n';
    for (int i = 0; i < n; i++)
        cout << ar[i] + 1 << ' ';
    cout.flush();
    return 0;
}
