#include <iostream>

using namespace std;
int arr[3000][3000];

int f(int i, int j)
{
    cout << "? " << i + 1 << " " << j + 1 << endl;
    int x;
    cin >> x;
    return x;
}

void update(int i, int j)
{
    if (arr[i][j] == 0)
        arr[i][j] = f(i, j);
}

int main()
{
    int n;
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        for (int j = i; j < n; j++)
        {
            arr[i][j] = 0;
        }
    }
    int q[n];
    for (int i = 0; i < n; i++)
        q[i] = 0;
    int x = 0;
    while (true)
    {
        bool e = false;
        int last = 0;
        for (int i = 0; i < n; i++)
        {
            if (q[i] == 0)
            {
                e = true;
                last = i;
                x++;
                q[i] = x;
                break;
            }
        }
        for (int i = 0; i < n; i++)
        {
            if (q[i] == 0 && i > last)
            {
                update(last, i);
                update(last + 1, i);
                if (arr[last][i] == arr[last + 1][i])
                {
                    last = i;
                    q[i] = x;
                }
            }
        }
        if (!e)
            break;
    }
    cout << "Ready!" << endl;
    update(0, n - 1);
    cout << arr[0][n - 1] << endl;
    for (int i = 0; i < n; i++)
        cout << q[i] << " ";
    cout << endl;
    return 0;
}
