// A.cpp : Defines the entry point for the console application.
//

#include <iostream>
#include <vector>
#include <string>

using namespace std;

int gen_rand()
{
	return rand() << 15 + rand();
}

struct node
{
	int size, key, pr, plus;
	node *ls, *rs;
	node(int val) : key(val), pr(gen_rand()), size(1), plus(0), ls(0), rs(0) {}
};

int get_size(node *n)
{
	if (n)
		return n->size;
	return 0;
}

void update(node *n)
{
	if (n)
	{
		n->size = get_size(n->ls) + get_size(n->rs) + 1;
	}
}

void push(node *n)
{
	if (n)
	{
		n->key += n->plus;
		if (n->ls)
			n->ls->plus += n->plus;
		if (n->rs)
			n->rs->plus += n->plus;
		n->plus = 0;
	}
}

node *merge(node*t1, node* t2)
{
	node *n;
	push(t1);
	push(t2);
	if (!t1)
		return t2;
	if (!t2)
		return t1;

	if (t1->pr > t2->pr)
	{
		n = merge(t1->rs, t2);
		t1->rs = n;
		update(t1);
		return t1;
	}
	else
	{
		n = merge(t1, t2->ls);
		t2->ls = n;
		update(t2);
		return t2;
	}
}

pair<node*, node*> split(node *t, int id)
{
	node *n;
	pair<node*, node*> p;
	push(t);
	if (!t)
		return make_pair((node*)0, (node*)0);

	if (get_size(t->ls) > id)
	{
		p = split(t->ls, id);
		t->ls = p.second;
		update(t);
		return make_pair(p.first, t);
	}
	else if(get_size(t->ls) < id)
	{
		p = split(t->rs, id - get_size(t->ls) - 1);
		t->rs = p.first;
		update(t);
		return make_pair(t, p.second);
	}
	else
	{
		n = t->ls;
		t->ls = 0;
		update(t);
		return make_pair(n, t);
	}
}

int main()
{
	int n, i, j, k, a, ql, qr, qm, t;
	vector<int> ans, s;
	node *d, *root;
	pair<node*, node*> p;
	cin >> n;
	ans.push_back(1);
	root = new node(1);
	t = 2;
	for (i = 2; i <= n; i++)
	{
		cout << '?' << ' ' << 1 << ' ' << i << endl;
		cout.flush();
		cin >> k;
		if (k == t)
		{
			ans.push_back(t++);
			root->plus += 1;
		}
		else
		{
			ql = 1;
			qr = i - 1;
			while (qr > ql)
			{
				qm = (qr + ql) / 2;
				cout << '?' << ' ' << i - qm << ' ' << i << endl;
				cout.flush();
				cin >> k;
				p = split(root, ans.size() - qm);
				d = p.first;
				p = split(p.second, 1);
				if (p.first->key + 1 == k)
					ql = qm + 1;
				else
					qr = qm;
				p.first = merge(d, p.first);
				root = merge(p.first, p.second);
			}
			ans.push_back(ans[i - ql - 1]);
			p = split(root, ans.size() - ql - 1);
			p.second->plus += 1;
			root = merge(p.first, p.second);
		}
		root = merge(root, new node(1));
	}

	cout << "Ready!" << endl << t - 1 << endl;
	for (i = 0; i < n; i++)
		cout << ans[i] << ' ';
	cout.flush();
}

