#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <algorithm>
#include <cstdlib>
#include <iomanip>

using namespace std;

//#define int long long
int a[1000000];
int n;
int dd(int l, int r) {
	vector <int> sss(n + 1);
	int ans = 0;
	for (int i = l; i <= r; ++i) {
		if (!sss[a[i]]) {
			++ans;
			sss[a[i]] = 1;
		}
	}
	return ans;
}
signed main() {
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	//freopen("video.in", "r", stdin);
	//freopen("video.out", "w", stdout);

	
	cin >> n;
	a[1] = 1;
	int maxx = 1;
	for (int i = 2; i <= n; ++i) {
		int bot = 0;
		int top = i;
		while (top > bot + 1) {
			int mid = (bot + top) / 2;
			cout << '?' << ' ' << mid << ' ' << i << endl;
			int p;
			cin >> p;
			if (p != dd(mid, i - 1) + 1) {
				bot = mid;
			}
			else {
				top = mid;
			}
		}
		if (bot) {
			a[i] = a[bot];
		}
		else {
			a[i] = ++maxx;
		}
	}
	cout << "Ready!" << endl;
	cout << maxx << endl;
	for (int i = 1; i <= n; ++i) {
		cout << a[i] << ' ';
	}
	cout << endl;
	return 0;
}