#include <iostream>

using namespace std;

const int MAXN = int(3e3);
int n, a[MAXN], cnt[MAXN];

int ask(int l, int r) {
	cout << "? " << l + 1 << ' ' << r + 1 << endl;
	cout.flush();
	int p;
	cin >> p;
	return p;
}

int main() {
	cin >> n;
	for (int i = 0; i < n; ++i)
		cnt[i] = 1;
	for (int i = 1; i < n; ++i) {
		if (ask(0, i) > cnt[0]) {
			a[i] = cnt[0];
			for (int j = 0; j < i; ++j)
				++cnt[j];
			continue;
		}
		int l = 0, r = i;
		while (l + 1 < r) {
			int m = (l + r) / 2;
			if (ask(m, i) == cnt[m])
				l = m;
			else
				r = m;
		}
		a[i] = a[l];
		for (int j = r; j < i; ++j)
			++cnt[j];
	}
	cout << "Ready!" << endl;
	cout << cnt[0] << endl;
	for (int i = 0; i < n; ++i)
		cout << a[i] + 1 << ' ';
	cout << endl;
	cout.flush();
	return 0;
}