#include <stdio.h>
#include <vector>
#include <iostream>
#include <algorithm>
#include <map>
#include <math.h>
#include <string>

using namespace std;

#pragma warning(disable:4996)

#define x first
#define y second
#define mp make_pair
#define pb push_back

typedef long long ll;

int ask(int l, int r) {
	printf("? %d %d\n", l + 1, r + 1);
	fflush(stdout);
	int ans;
	scanf("%d", &ans);
	return ans;
}

int a[3030];

int build(int l, int r) {
	if (r - l == 1) {
		a[l] = 1;
		return 1;
	}
	map<int, int> d, cng;
	int m = (l + r) / 2;
	int L = build(l, m);
	int R = build(m, r);
	if (L >= R) {
		for (int i = l; i < m; ++i) {
			d[a[i]]++;
		}
		for (int i = m; i < r; ++i) {
			if (cng.find(a[i]) != cng.end()) {
				a[i] = cng[a[i]];
			}
			else {
				int s = ask(l, i);
				if (s > d.size()) {
					cng[a[i]] = a[i] + L;
					a[i] += L;
				}
			}
			d[a[i]]++;
		}
	}
	else {
		for (int i = m; i < r; ++i) {
			d[a[i]]++;
		}
		for (int i = m - 1; i >= l; --i) {
			if (cng.find(a[i]) != cng.end()) {
				a[i] = cng[a[i]];
			}
			else {
				int s = ask(i, r - 1);
				if (s > d.size()) {
					cng[a[i]] = a[i] + R;
					a[i] += R;
				}
			}
			d[a[i]]++;
		}
	}
	return d.size();
}

void solve() {
	int n, ans;
	scanf("%d", &n);
	ans = build(0, n);
	printf("Ready!\n");
	fflush(stdout);
	printf("%d\n", ans);
	fflush(stdout);
	for (int i = 0; i < n; ++i) {
		printf("%d ", a[i]);
	}
	fflush(stdout);
	cerr << ans << endl;
	for (int i = 0; i < n; ++i) {
		cerr << a[i] << ' ';
	}
	cerr << endl;
}

int main() {
#pragma comment(linker, "/STACK:536870912")
//#ifdef _DEBUG
//	freopen("input.txt", "rt", stdin);
//	freopen("output.txt", "wt", stdout);
//#else
//	freopen("video.in", "rt", stdin);
//	freopen("video.out", "wt", stdout);
//#endif
	freopen("output.txt", "wt", stderr);
	solve();
	return 0;
}
