#include <iostream>
#include <vector>

#define ff first
#define ss second
#define mp make_pair

using namespace std;

int query(int l, int r) {
	cout << "? " << l << " " << r << "\n";
	int res; cin >> res;
	return res;
}

pair<vector<int>, int> solve(int l, int r) {
	if (l == r) {
		vector<int> dna{ 1 };
		return mp(dna, 1);
	}
	pair<vector<int>, int> sol = solve(l, r - 1);
	int next_nucl = sol.ss + 1;
	int prev_cnt = 1;
	for (int i = r - 1; i >= l; --i) {
		int next_cnt = query(i, r);
		if (next_cnt == prev_cnt) {
			next_nucl = sol.ff[i - l];
		}
	}
	sol.ff.push_back(next_nucl);
	return sol;
}

int main() {
	ios_base::sync_with_stdio(0);
	int n; cin >> n;
	pair<vector<int>, int> sol = solve(1, n);
	cout << "Ready!\n";
	cout << sol.ss << "\n";
	for (auto el : sol.ff) cout << el << " ";
	cout << "\n";
	return 0;
}