#include <cstdio>
#include <iostream>
#include <cmath>
#include <algorithm>

using namespace std;

const int sz = 2e3;

int dna[sz];

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	//freopen("video.in", "r", stdin);
	//freopen("video.out", "w", stdout);
	int n;
	scanf("%d", &n);
	dna[0] = 1;
	int k = 1;
	for (int i = 1; i < n; i++) {
		printf("? %d %d\n", i, i + 1);
		fflush(stdout);
		int ans;
		scanf("%d", &ans);
		if (ans == 1) {
			dna[i] = dna[i - 1];
		}
		else {
			k = 2;
			dna[i] = (dna[i - 1] % 2) + 1;
		}
	}
	printf("Ready!\n");
	fflush(stdout);
	printf("%d\n", k);
	fflush(stdout);
	for (int i = 0; i < n; i++) {
		printf("%d ", dna[i]);
	}
	printf("\n");
	fflush(stdout);
    return 0;
}

