#include <iostream>
#include <vector>

using namespace std;

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