#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <climits>

using namespace std;

int ask(int l, int r) {
	l++, r++;
	printf("? %d %d\n", l, r);
	fflush(stdout);
	int ans;
	scanf("%d", &ans);
	return ans;
}

int main() {
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	int n;
	cin >> n;
	int suf = ask(0, n - 1);
	vector<vector<int> > v(n);
	vector<int> ans(n);
	ans[0] = 1;
	for (int i = 0; i < n; i++)
		v[i].resize(suf + 1, true);
	for (int i = 0; i < n; i++) {
		if (ans[i] == 0)
			for (int j = 1; j <= suf; j++)
				if (v[i][j]) {
					ans[i] = j;
					break;
				}

		int m = i + 1;
		while (m < n && ask(i, m) == m - i + 1) m++;
		for (int j = i + 1; j < m; j++)
			v[j][ans[i]] = false;
	}

	printf("Ready!\n%d\n", suf);
	for (int i = 0; i < n; i++)
		printf("%d ", ans[i]);
	printf("\n");
	fflush(stdout);

	return 0;
}