#include <iostream>
#include <set>
#include <vector>

#define MAXN 5000

using namespace std;

vector<int> arrsd;
int qs[MAXN][MAXN];
int cnt = 0;

int Ask(int l, int r)
{
	if (qs[l][r] > 0)
		return qs[l][r];
	if (r == l + 1)
		return 1;
	cout << "? " << l + 1 << " " << r << endl;
	cin >> qs[l][r];
	return qs[l][r];
}

int arr[MAXN];
int num[MAXN];
int dif[MAXN][MAXN];

int main()
{
	int n, ind = 1;
	cin >> n;
	int k = num[n - 1] = Ask(0, n);
	for (int i = 0; i < n; i++)
	{
		num[i] = Ask(0, i + 1);
		if (i == 0 || num[i] > num[i - 1])
		{
			arr[i] = ind++;
			for (int u = 0; u < i; u++)
				dif[u][i] = dif[u][i - 1] + 1;
			dif[i][i] = 1;
		}
		else
		{
			int l = 0, r = i;
			while (r - l > 1)
			{
				int m = (l + r) / 2;
				if (dif[i - m][i - 1] == Ask(i - m, i + 1))
					r = m;
				else
					l = m;
			}
			arr[i] = arr[i - r];
			for (int u = 0; u < i; u++)
				dif[u][i] = dif[u][i - 1];
			for (int u = r + 1; u <= i; u++)
				dif[u][i]++;

		}
	}
	cout << "Ready!\n";
	cout << k << endl;
	for (int i = 0; i < n; i++)
		cout << arr[i] << " ";
	cout << endl;
	return 0;
}