#include <iostream>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <cstdlib>
#include <ctime>
#include <string>
#include <algorithm>
using namespace std;

#define vec vector
#define pb push_back
#define rep(k, l, r) for (int k = (int)(l); k < (int)(r); k++)
typedef pair<int, int> PII;
typedef long long ll;

int n;

int main() {
	ios_base::sync_with_stdio(false);
	cin >> n;
	vec<int> arr(n);
	arr[0] = 0;
	int am = 1;
	rep(k, 1, n) {
		cout << "? " << k << " " << k + 1 << '\n';
		int x;
		cin >> x;
		if (x == 2) { arr[k] = (arr[k - 1] + 1) % 2; am = 2; }
		else { arr[k] = arr[k - 1]; }
	}
	cout << "Ready!\n" << am << '\n';
	rep(k, 0, n) { cout << arr[k] + 1 << " "; } cout << '\n';
	return 0;
}
