#include <iostream>
#include <vector>

using namespace std;

int main() {
    int n, r;
    cin >> n;
    int l = r = 0;
    int ans = 1;
    int curr_sym = 1;
    vector<int> res(n);
    while (l < n) {
        while (r < n and ans == 1) {
            cout << "? " << l + 1 << ' ' << r + 1 << endl;
            cin >> ans;
            if (ans == 1) {
                r++;
            }
        }
        for (int i = l; i < r; i++) {
            res[i] = curr_sym;
        }
        curr_sym = 3 - curr_sym;
        l = r;
        r++;
    }
    cout << "Ready!" << endl;
    int max_el = 0;
    for (int i = 0; i < n; i++) {
        max_el = max(max_el, res[i]);
    }
    cout << max_el << endl;
    for (int i = 0; i < n; i++) {
        cout << res[i] << ' ';
    }
    cout << endl;
}
