// 2DNK.cpp : Defines the entry point for the console application.
//

#include <iostream>
#include <vector>

using namespace std;

int n, k;
vector <int> res;
int num, last;

int main()
{
	cin >> n;

	cout << "? 1 " << n << '\n';
	cout.flush();

	cin >> k;

	res.resize(n);
	res[0] = 1;

	int p = 0, q = 1;

	while (q < n)
	{
		cout << "? " << p + 1 << ' ' << q + 1 << '\n';
		cout.flush();

		cin >> num;

		if (num == 1)
		{
			for (int i = p + 1; i <= q; i++)
			{
				res[i] = res[p];
			}
			p = q;
			q++;
			continue;
		}

		if (num == q - p + 1)
		{
			res[q] = res[q - 1] + 1;
			if (res[q] > k)
				res[q] = 1;
			q++;
			continue;
		}
		p++;
		last = num;
		while (p < q)
		{
			cout << "? " << p + 1 << ' ' << q + 1 << '\n';
			cout.flush();
			cin >> num;

			if (num == last)
			{
				res[q] = res[p - 1];
				break;
			}
			p++;
			last = num;
		}
		if (p == q)
			res[q] = res[q - 1] + 1;
		q++;
	}

	cout << "Ready!\n" << k << '\n';
	for (int i = 0; i < n; i++)
		cout << res[i] << ' ';
	cout.flush();
	
	return 0;
}

