#include <string>
#include <map>
#include <set>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <vector>
using namespace std;

#ifdef _DEBUG
#include <iostream>
//ifstream cin("input.txt");
//ofstream cout("output.txt");
#else
#include <iostream>
//ifstream cin("video.in");
//ofstream cout("video.out");
#endif

int x;
int a[3000];
bool us[3000];
bool u[3000];

vector < int > g;

void dfs(int v, int color){
	u[v] = true;
	a[v] = color;
	if (g[v] != -1)
		dfs(g[v], color);
}

int main() {
	cin >> x;
	int ans = 0;
	cout << "? 1 " << x << endl;
	cout.flush();
	cin >> ans;

	int q = 1;

	a[0] = 1;

	int c = 2;

	for (int i = 0; i < x; i++) {
		if (a[i] == 0)
			a[i] = c++;
		int l = i;
		int r = x;
		while(l != r - 1) {
			int j = l + r >> 1;

			if (!us[j]) {
				int res1 = 1;
				if (i + 2 != j + 1) {
					cout << "? " << i + 2 << ' ' << j + 1 << endl;
					q++;
					cout.flush();
					cin >> res1;
				}
				int res2 = 0;
				cout << "? " << i + 1 << ' ' << j + 1 << endl;
				q++;
				cout.flush();
				cin >> res2;
				if (res1 == res2)
					r = j;
				else
					l = j;
			}
		}
		a[r] = a[i];
	}

	if (a[x - 1] == 0)
		a[x - 1] = c++;
	cout << "Ready!" << endl;
	cout.flush();
	cout << ans << endl;
	cout.flush();
	int mx = 0;
	for (int i = 0; i < x; i++) {
		if (a[i] == 0)
			cout << 1;
		else
		cout << a[i] << ' ';
	}
	cout << endl;
	cout.flush();
	

	#ifdef _DEBUG
	system("pause");
	#endif
}