#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
	int n;
	cin >> n;
	vector<int> a(n);
	a[0] = 1;
	int pr = 1;
	vector<bool> s(n, true);
	for (int i = 1; i < n; ++i) {
		cout << "? " << 1 << ' ' << i + 1 << endl;
		cout.flush();
		int ans;
		cin >> ans;
		if (pr < ans) {
			a[i] = ans;
			pr = ans;
		}
		else {
			int prt = pr;
			for (int j = 0; j < i; ++j) {
				if (s[j]) {
					cout << "? " << j + 2 << " " << i + 1 << endl;
					cout.flush();
					cin >> ans;
					if (ans == prt) {
						a[i] = a[j];
						s[j] = false;
						break;
					}
					prt = ans;
				}
			}
		}
	}
	cout << "Ready!\n" << pr << '\n';
	for (int i = 0; i < n; ++i)
		cout << a[i] << ' ';
}