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