#include <iostream>
#include <fstream>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

int n, k, a[10000], c = 1;
vector <int> v;

void rec(int l, int r, int k, vector <int> v) {
	int p1, p2, p3, m;
	vector <int> v1, v2;
	if (l == r) {
		a[l] = v[0];
		return;
	}
	v1.clear();
	v2.clear();
	m = (l + r) / 2;
	cout << "? " << l << " " << m << endl;
	cin >> p1;
	cout << "? " << m + 1 << " " << r << endl;
	cin >> p2;
	cout << "? " << m << " " << m + 1 << endl;
	cin >> p3;
	for (int i = 0; i < p1; i++)
		v1.push_back(v[i]);
	for (int i = k - p2; i < k; i++)
		v2.push_back(v[i]);
	rec(l, m, p1, v1);
	if (p3 == 2 && a[m] == v2[0]) {
		if (v2.size() != 1)
			swap(v2[0], v2[1]);
		else
			v2[0] = 3 - v2[0];
	}
	if (p3 == 1 && a[m] != v2[0])
		for (int i = 0; i < v2.size(); i++)
			if (v2[i] == a[m]) {
				swap(v2[0], v2[i]);
				break;
			}
	rec(m + 1, r, p2, v2);
}

int main() {
	//ifstream cin("in.txt");
	//ofstream cout("out.txt");
	cin >> n;
	cout << "? " << 1 << " " << n << endl;
	cin >> k;
	for (int i = 1; i <= k; i++)
		v.push_back(i);
	rec(1, n, k, v);
	cout << "Ready!" << endl;
	cout << k << endl;
	for (int i = 1; i <= n; i++)
		cout << a[i] << " ";
	return 0;
}