#include <bits/stdc++.h>

#define TASK ""
using namespace std;
typedef long long ll;
typedef long double ld;

ll ans[3456];
ll nowsuff[3456];

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
#ifdef DEBUG
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#else
    if(strcmp(TASK,"")!=0)
    {
        freopen(TASK".in","r",stdin);
        freopen(TASK".out","w",stdout);
    }
#endif
    ll n;
    cin >> n;
    ll nownext = 2;
    ans[0] = 1;
    for (int i = 1; i < n; i++)
    {
        // test to new
        cout << "? 1 " << i+1 << "\n";
        cout.flush();
        ll p;
        cin >> p;
        if (p == nownext)
        {
            ans[i] = nownext;
        }
        else
        {
            set<ll> tmp;
            for (int j = i - 1; j >= 0; j--)
            {
                tmp.insert(ans[j]);
                nowsuff[j] = tmp.size();
            }
            ll l = 0, r = i;
            while (l + 1 != r)
            {
                ll m = (l + r) >> 1;
                cout << "? " << m+1 << " " << i+1 << endl;
                cout.flush();
                cin >> p;
                if (p == nowsuff[m])
                {
                    l = m;
                }
                else r = m;
            }
            ans[i] = ans[l];
        }
    }
    cout << "Ready!\n";
    cout << nownext << endl;
    for(int i=0;i<n;i++)
    {
        cout << ans[i] << " ";
    }
    return 0;
}