#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <stack>

using namespace std;

#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair


int q(int l, int r){
    cout << "? " << l << " " << r << endl;
    cout.flush();
    int p;
    cin >> p;
    return p;
}

int main()
{
    int n;
    cin >> n;

    int k = q(1, n);
    vector< pair<int, int> > pos;
    vector<int> a(n + 1);
    a[1] = 1;
    pos.pb(mp(1, 1));

    int cur = 1, dif = 1;
    for (int i = 2; i <= n; ++i){
        if (q(1, i) == cur + 1){
            cur++;
            a[i] = cur;
            pos.pb(mp(i, cur));
            sort(pos.rbegin(), pos.rend());
            continue;
        }

        dif = 1;
        for (int j = 0; j < cur; ++j){
            if (q(pos[j].first, i) == dif){
                a[i] = pos[j].second;
                pos[j].first = i;
                sort(pos.rbegin(), pos.rend());
                break;
            }
            else
                dif++;
        }
    }

    cout << "Ready!" << endl << k << endl;
    for (int i = 1; i <= n; ++i)
        cout << a[i] << ' ';
    cout << endl;

    fclose(stdout);
    return 0;
}






