#include <bits/stdc++.h>

using namespace std;

const int MAXN = 3005;

int a[MAXN];

int main() {
    int n;
    cin >> n;
    a[0] = 1;
    for (int i = 0, res; i < n - 1; ++i) {
        cout << "? " << i + 1 << ' ' << i + 2 << endl;
        cin >> res;
        if (res == 1)
            a[i + 1] = a[i];
        else
            a[i + 1] = 3 - a[i];
    }
    cout << "Ready!\n";
    cout << min(n, 2) << endl;
    for (int i = 0; i < n; ++i)
        cout << a[i] << ' ';
    cout << endl;

    return 0;
}
