#define fname "video"

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

#include <vector>
#include <map>
#include <set>



#define forn(i, n) for (int i = 0; i < n; i ++)
#define fornn(i, m, n) for (int i = m; i < n; i ++)

#define inb push_back
#define mk make_pair
#define X first
#define Y second

using namespace std;

vector<pair<int, int> > qwe;

int n;

map<pair<int, int>, int> asd;

int cntoper = 0;

int check(int l, int r) {
	if (l < 0)
		return 100000;
	if (asd.count(mk(l, r)))
		return asd[mk(l, r)];
	cntoper++;
	cout << "? " << l + 1 << ' ' << r + 1 << endl;
	int x;
	cin >> x;
	return asd[mk(l, r)] = x;
}

void init() {
	forn(i, n)
		qwe.inb(mk(i, i));
	return;
	int ind = 0;
	while (ind < n) {
		int st = 1;
		int r = ind;
		int border = n;
		while (1) {
			int now;
			if (r + st >= border) {
				now = 2;
			}
			else
				now = check(ind, r + st);
			
			if (now != 1) {
				if (st == 1)
					break;
				border = min(border, r + st);
				r += st / 2;
				st = 1;
			}
			else
				st *= 2;
		}
		qwe.inb(mk(ind, r));
		ind = r + 1;
	}
}

vector<int> ans;
int timer = 0;

int qq[4000];

int sum(int v) {
	int ans = 0;
	for (int i = v; i >= 0; i = (i & (i + 1)) - 1)
		ans += qq[i];
	return ans;
}

void inc(int v, int x) {
	for (int i = v; i < n; i = (i | (i + 1)))
		qq[i] += x;
}

vector<int> num(4000, -1);

int cntodd(int l, int r) {
	int cnt = sum(r) - sum(l - 1);
	return r - l + 1 - cnt;
}
void fuckans(){
	int ind = 0;
	forn(i, qwe.size()) {
		ans[i] = timer;
		int l = -1;
		int r = i;
		while (l != r - 1) {
			int m = (l + r) / 2;
			int now = check(qwe[m].X, qwe[i].X);
			if (now >= i - m + 1 - cntodd(m, i - 1)) {
				r = m;
			}
			else
				l = m;
		}
		if (l >= 0)
			ans[i] = ans[l];
		if (ans[i] == timer)
			timer++;
		if (num[ans[i]] != -1) {
			inc(num[ans[i]], -1);
		}
		num[ans[i]] = i;
		inc(i, 1);
	}
}

int main() {
#ifdef _DEBUG
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#else
	//freopen(fname".in", "r", stdin);
//	freopen(fname".out", "w", stdout);
#endif
	cin >> n;
	if (n == 1) {
		cout << "Ready!" << endl;
		cout << 1 << endl;
		cout << 1 << endl;
		exit(0);
	}
	init();
	ans.assign(qwe.size(), -1);
	fuckans();

	cout << "Ready!" << endl;
	cout << timer << endl;
	forn(i, qwe.size()){
		fornn(j, qwe[i].X, qwe[i].Y + 1)
			cout << ans[i] + 1 << ' ';
	}
	cout << endl;
	return 0;
}