#include <bits/stdc++.h>

#define size(cont) int(cont.size())
#define forn(i, n) for (int i = 0; i < int(n); ++i)
#define llong long long

#ifdef HOME
    #define filename "file"
#else
    #define filename "twopaths"
#endif // HOME

const llong inf = (llong) 1e9 + 7ll;
char buff[(int) 1e6 + 17];

inline void config_io()
{
//    freopen(filename".in", "r", stdin);

#ifndef HOME
    freopen(filename".out", "w", stdout);
#endif
}

using namespace std;

const int maxn = (int) 3e3 + 17;

int n;
int ans[maxn];
bool used[maxn];

int req(int l, int r)
{
    printf("? %d %d\n", l, r);
    fflush(stdout);

    int t;
    scanf("%d", &t);
    return t;
}

int main()
{
    config_io();

    scanf("%d", &n);
    ans[0] = 1;

    int cur = 1, pr = 1;

    for (int i = 1; i < n; ++i)
    {
        int t = req(1, i + 1);

        if (t > pr)
        {
            ans[i] = ++cur;
            pr = t;
        }
        else
        {
            bool good = false;
            memset(used, false, sizeof(used));
            int cnt = 0;

            for (int j = i; j >= 0; --j)
            {
                if (!used[ans[j]])
                    ++cnt;

                used[ans[j]] = true;
                t = req(j + 1, i + 1);

                if (t != cnt)
                {
                    ans[i] = ans[j];
                    good = true;
                    break;
                }
            }
        }
    }

    printf("Ready!\n");
    fflush(stdout);
    printf("%d\n", cur);
    fflush(stdout);

    for (int i = 0; i < n; ++i)
    {
        printf("%d ", ans[i]);
    }

    printf("\n");
    fflush(stdout);

    return 0;
}
