#include <bits/stdc++.h>

using namespace std;

int k;
vector<int> a;

inline void ready(vector<int> & ans) {
	cout << "Ready!\n" << k << "\n";
	for (auto i : ans) {
		cout << i << " ";
	}
	cout << endl;
}

inline int query(int l, int r) {
	cout << "? " << l << " " << r << endl;
	int response;
	cin >> response;
	return response;
}

inline int diffs(int l, int r) {
	vector<char> nums(k + 1, 0);

	for (int i = l - 1; i < r; i++) {
		nums[a[i]] |= 1;
	}

	int ans = 0;

	for (int i = 0; i <= k; i++) {
		ans += nums[i];
	}

	return ans;
}

int main() {
	// ios::sync_with_stdio(0);
	// cin.tie(nullptr);
	// cout.tie(nullptr);

	int n;
	cin >> n;

	a.resize(n, 1);

	if (n == 1) {
		k = 1;
		ready(a);
		return 0;
	}

	k = query(1, n);

	for (int i = 1; i < n; i++) {
		int knownDiff = diffs(1, i);
		int actDiff = query(1, i + 1);

		if (knownDiff + 1 == actDiff) {
			a[i] = actDiff;
		} else {
			vector<char> was(k, 0);

			int nowDiff = 0;

			int l = 0, r = i + 1;

			while (r - l > 1) {
				int m = (l + r) / 2;

				nowDiff = diffs(m, i);
				actDiff = query(m, i + 1);

				if (nowDiff >= actDiff) {
					l = m;
				} else {
					r = m;
				}
			}

			a[i] = a[l];
		}
	}

	ready(a);

	return 0;
}
