#define	_CRT_SECURE_NO_WARNINGS
#define	_USE_MATH_DEFINES
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include <functional>
#include <map>
#include <stack>
#include <set>
#include <queue>
#include <deque>
#include <vector>

#define	mp	make_pair

using namespace std;

const int MAXN = 200000;
const int INF = 1000000010;

typedef	long long int	ll;
typedef	long double		ld;
typedef	pair<int, int>	ii;
typedef	vector<int>		vi;
typedef	vector<ii>		vii;

int N;
int K = 1;
int c[MAXN];
bool f[MAXN];

int ask(int pi, int pj) {
	printf("? %d %d\n", pi, pj);
	fflush(stdout);

	int res;
	scanf("%d", &res);
	return res;
}

int get_diff(int pi, int pj) {
	memset(f, 0, sizeof(f));
	int res = 0;
	for (int i = pi; i <= pj; i++) {
		if (!f[c[i]]) {
			f[c[i]] = true;
			res++;
		}
	}
	return res;
}

int main() {
#ifdef FILE_IO
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#else
	//
	//
#endif // FILE_IO

	scanf("%d", &N);
	c[0] = 1;
	int lb, rb, md;
	for (int i = 1; i < N; i++) {
		lb = 0, rb = i, md;

		while (lb < rb) {
			md = (lb + rb) / 2;

			if (ask(md+1, i+1) != get_diff(md, i))
				lb = md + 1;
			else
				rb = md;
		}

		if (lb == 0)
			c[i] = ++K;
		else
			c[i] = c[lb - 1];
	}

	puts("Ready!");
	printf("%d\n", K);
	for (int i = 0; i < N; i++)
		printf("%d ", c[i]);

	return 0;
}