#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;
}

void answer(int n) {
	cout << "Ready!\n";
	cout << cnt[1][n] << '\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) cnt[i][i] = 1;
	for (int i = 1; i <= n; ++i)
		for (int j = i + 1; j <= n; ++j) {
			ask(i, j);
			cin >> cnt[i][j];
		}

	ans[1] = 1;
	for (int i = 2; i <= n; ++i) {
		ans[i] = -1;
		for (int j = i - 1; j >= 1; --j)
			if (cnt[j][i - 1] == cnt[j][i]) {
				ans[i] = ans[j];
				break;
			}
		if (ans[i] == -1)
			ans[i] = cnt[1][i];
	}

	answer(n);

	return 0;
}