#include <bits/stdc++.h>
using namespace std;
typedef long long LL;

int main() {
    /*
    #define FNAME ""
    #ifndef LOCAL
    freopen(FNAME ".in", "r", stdin);
    freopen(FNAME ".out", "w", stdout);
    #endif
    */
    int n;
    scanf("%d", &n);
    vector<vector<int>> q(n, vector<int>(n));
    for(int l = 0; l < n; ++l) {
        for(int r = l; r < n; ++r) {
            printf("? %d %d\n", l+1, r+1);
            fflush(stdout);
            scanf("%d", &q[l][r]);
        }
    }
    vector<int> c(n);
    int next_c = 1;
    for(int l = 1; l < n; ++l) {
        int pos = -1;
        for(int r = l; r < n; ++r) {
            if(q[l][r] == q[l-1][r]) {
                pos = r;
                break;
            }
        }
        if(c[l-1] == 0) {
            c[l-1] = next_c++;
        }
        if(pos != -1) {
            c[pos] = c[l-1];
        }
    }
    if(c[n-1] == 0) {
        c[n-1] = next_c++;
    }
    printf("Ready!\n%d\n", next_c-1);
    for(int i = 0; i < n; ++i) {
        printf("%d ", c[i]);
    }
    printf("\n");
    return 0;
}
