#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <string>
#include <vector>
#include <map>
#include <algorithm>

using namespace std;

const int MAXN = 3001;
int a[MAXN];
bool used[MAXN];
bool used1[MAXN];
int main(){
    //freopen("typing.in", "r", stdin);
    //freopen("typing.out", "w", stdout);
    //freopen("input.txt", "r", stdin);
    int n;
    cin >> n;
    a[0] = 1;
    int maxel = 1;
    for (int i = 1; i < n; i++){
        cout << '?' << ' ' << 1 << ' ' << i + 1 << endl;
        cout.flush();
        int k;
        cin >> k;
        if (k > maxel){
            a[i] = maxel + 1;
            maxel += 1;
            continue;
        }
        for (int j = 1; j <= maxel; j++){
            used[j] = true;
        }
        int ost = maxel;
        int otsh = 0;
        while (ost > 1){
            int nuj = otsh + ost / 2;
            for (int j = 0; j < n; j++){
                used1[j] = true;
            }
            int j = i - 1;
            for (; j >= 0; j--){
                if (used1[a[j]] == true){
                    used1[a[j]] = false;
                    nuj -= 1;
                }
                if (nuj == 0){
                    break;
                }
            }
            cout << '?' << ' ' << j + 1 << ' ' << i + 1 << endl;
            cout.flush();
            int poo;
            cin >> poo;
            if (poo == otsh + ost / 2){
                for (int j = 1; j <= maxel; j++){
                    if ((used[j]) && (used1[j])){
                        used[j] = false;
                    }
                }
                ost = ost / 2;
            }
            else{
                for (int j = 1; j <= maxel; j++){
                    if ((used[j]) && (!used1[j])){
                        used[j] = false;
                    }
                }
                otsh += ost / 2;
                ost = ost - ost / 2;
            }
        }
        for (int j = 1; j <= maxel; j++){
            if (used[j]){
                a[i] = j;
            }
        }
    }
    cout << "Ready!";
    cout << endl << maxel << endl;
    for (int i = 0; i < n; i++){
        cout << a[i] << ' ';
    }

}
