#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;

int main(){
    int n, k, l;
    cin >> n;
    cout << "? 1 " << n << endl;
    cin >> k;
    vector<int> v(k, 0);
    vector<int> post(k, -1);
    v[0] = 1;
    post[0] = 0;
    int newn = 2;
    for(int i = 1; i < n; i++){
        bool res = false;
        int was = 0;
        for(int j = i - 1; j >= 0; j--){
            if(not res){
                if(post[v[j] - 1] == j){
                    was += 1;
                    cout << "? " << j + 1 << " " << i + 1 << endl;
                    cin >> l;
                    if(l == was){
                        v[i] = v[j];
                        post[v[j] - 1] = i;
                        res = true;
                    }
                }
            }
        }
        if(not res){
            v[i] = newn;
            post[newn - 1] = i;
        }
    }
    cout << "Ready!" << endl;
    cout << k << endl;
    for(int i = 0; i < n; i++){
        cout << v[i] << " ";
    }
    cout << endl;
    return 0;
}
