#include <bits/stdc++.h>
using namespace std;

int n;

int ans[3030];
int last;

int asks[3030][3030], d[3030][3030];
bool used[3030];

inline int ask(int l, int r)
{
	if (r - l == 1)
		return 1;
	if (asks[l][r] != 0)
		return asks[l][r];
	printf("? %d %d\n", l + 1, r);
	fflush(stdout);
	int x;
	scanf("%d", &x);
	fflush(stdout);
	return asks[l][r] = x;
}

inline int diff(int l, int r)
{
	if (r - l == 1)
		return 1;
	if (d[l][r] != 0)
		return d[l][r];
	unordered_set <int> q;
	for (int i = l; i < r; ++i)
		q.insert(ans[i]);

	return d[l][r] = (int)q.size();
}

int pos[3030], ptr;



int main()
{
	scanf("%d", &n);

	last = 1;

	for (int i = 1; i < n; ++i)
	{
		int x = ask(0, i + 1);
		if (x != diff(0, i))
		{
			ans[i] = last++;
			continue;
		}
		ans[i] = -1;

		memset(used, 0, sizeof(used));

		ptr = 0;

		for (int j = i - 1; j >= 0; --j)
		{
			if (!used[ans[j]])
				pos[ptr++] = (j);
			used[ans[j]] = true;
		}

		int l = -1, r = ptr - 1;

		int y;

		while (r - l != 1)
		{
			int m = (l + r) / 2;
			y = ask(pos[m], i + 1);
			if (y == diff(pos[m], i))
				r = m;
			else
				l = m;
		}

		ans[i] = ans[pos[r]];

		/*for (int j = i - 1; j >= 0; --j)
		{
			if (used[ans[j]])
				continue;
			y = ask(j, i + 1);
			used[ans[j]] = true;
			if (y == diff(j, i))
			{
				ans[i] = ans[j];
				break;
			}
		}
		if (ans[i] == -1)
			ans[i] = last++;*/
	}






	printf("Ready!\n%d\n", last);

	for (int i = 0; i < n; ++i)
		printf("%d ", ans[i] + 1);

	printf("\n");


	return 0;
}