#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <string>
#include <set>

using namespace std;

#define vec vector
#define ALL(x) (x).begin(), (x).end()
#define mp make_pair

typedef pair< int, int > pii;

int ask(int l, int r) {
	printf("? %d %d\n", l, r);
	fflush(stdout);
	int res;
	scanf("%d", &res);
	return res;
}
 
void ready(int k, vec< int > p) {
	printf("Ready!\n%d\n", k);
	for (int i = 1; i < (int)p.size(); i++) {
		printf("%d ", p[i]);
	}
	printf("\n");
}

int cnt(const vec< int > & a, int l, int r) {
	set< int > s;
	for (int i = l; i <= r; i++) s.insert(a[i]);
	return (int)s.size();
}

bool solve() {

	int n;
	scanf("%d", &n);

	int k = ask(1, n);

	vec< int > a(n + 1);

	a[1] = 1;
	
	for (int cur = 1, i = 2; i <= n; i++) {
		int bl, br, bm;
		bl = 1;
		br = i - 1;

		while (br - bl > 1) {
			bm = (bl + br) / 2;
			if (cnt(a, bm, i - 1) == ask(bm, i)) bl = bm;
			else br = bm - 1;
		}

		if (cnt(a, br, i - 1) == ask(br, i)) a[i] = a[br];
		else if (bl < br && cnt(a, bl, i - 1) == ask(bl, i)) a[i] = a[bl];
		else a[i] = ++cur;
	}

	ready(k, a);

	return true;
}

int main() {

	//while (solve());
	solve();

	return 0;
}