#include <iostream>
#include <vector>
using namespace std;
int main() {
	int n;
	int a[3000];
	cin >> n;
	for (int i = 0; i < n; i++)
		a[i] = i+1;
	for (int i = 1; i < n; i++){
		a[i] = a[i - 1] + 1;
		vector<int> used(n+1);
		for (int j = i - 1; j >= 0; j--) {
			vector<int> u(n + 1);
			int k = 0;
			for (int o = j; o < i; o++)
				if (!u[a[o]]) k++, u[a[o]] = 1;
			int k1;
			k++;
			cout << "? " << j + 1 << ' ' << i + 1 << '\n';
			cout.flush();
			cin >> k1;
			if (k1 < k && !used[a[j]]) {
				a[i] = a[j];
				break;
			}
			else
				used[a[j]] = 1;
		}
	}
	vector<int> used(n+1);
	int k = 0;
	for (int i = 0; i < n; i++)
		if (!used[a[i]]) k++, used[a[i]] = 1;
	cout << "Ready!\n" << k << '\n';
	for (int i = 0; i < n; i++)
		cout << (a[i]>k ? k : a[i]) << ' ';
}