#include <iostream>
#include <iomanip>
#include <cstdio>

#include <cassert>
#include <cmath>
#include <algorithm>
#include <utility>

#include <vector>
#include <set>
#include <map>
#include <queue>
#include <bitset>

using std::cin;
using std::cout;
using std::cerr;

using std::max;
using std::min;
using std::abs;

using std::vector;
using std::set;
using std::map;
using std::pair;

#define ff first 
#define ss second
#define pb push_back
#define print(x) cerr << (x) << '\n'
#define dbg(a) cerr << #a << " = " << (a) << '\n'
#define dbg2(a, b) cerr << #a << " = " << (a) << " " << #b << " = " << (b) << '\n'
#define dbg3(a, b, c) cerr << #a << " = " << (a) << " " << #b << " = " << (b) << " " << #c << " = " << (c) << '\n'

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

void init() {
	std::iostream::sync_with_stdio(false);
	cout << std::fixed << std::setprecision(10);
	cerr << std::fixed << std::setprecision(10);
}

const int MAXN = 3001;

int cnt[MAXN][MAXN];
int ans[MAXN];

void ask(int i, int j) {
	cout << "? " << i << ' ' << j << std::endl;
}


int get(int i, int j) {
	if (cnt[i][j] == -1) {
		ask(i, j);
		cin >> cnt[i][j];
	}
	return cnt[i][j];
}
// int mx = 0;
void answer(int n) {
	int q = get(1, n);
	cout << "Ready!\n" << q << '\n';
	for (int i = 1; i <= n; ++i) {
		cout << ans[i] << ' ';
	}
	cout << std::endl;
}


int main() {
	init();

	int n;
	cin >> n;

	for (int i = 1; i <= n; ++i)
		for (int j = 1; j <= n; ++j) {
			cnt[i][j] = -1;
		}
	for (int i = 1; i <= n; ++i) cnt[i][i] = 1;

	ans[1] = 1;
	for (int i = 2; i <= n; ++i) {
		ans[i] = -1;
		int l = 0, r = i;
		while (r - l > 1) {
			int m = (l + r) >> 1;
			if (get(m, i - 1) == get(m, i))
				l = m;
			else
				r = m;
		}
		// dbg2(i, l);
		ans[i] = ans[l];
		if (l == 0) 
			ans[i] = get(1, i);
	}

	answer(n);

	return 0;
}