#include <bits/stdc++.h>

using namespace std;

int col = 0;
int main()
{
//    freopen("video.in", "r", stdin);
//    freopen("video.out", "w", stdout);
	int n;
	cin >> n;
	vector <int> m(n * 2, -1);
	int sum = 1;
	cout << "? 1 2\n";
	cout.flush();
	if (n != 1)
    {
        int r = 2, l;
        int k;
        cin >> k;
        ++col;
        m[0] = 1;
        m[1] = k;
        col = k;
        int dif = 1, pr = 0;
        while (r < n)
        {
            ++r;
            cout << "? 1 " << r << '\n';
            cout.flush();
            cin >> k;
            if (k == col + 1)
            {
                m[r - 1] = k;
                col = k;
            }
            else
            {
                pr = 1;
                dif = -1;
                l = r - 1;
                while (dif != pr)
                {
                    dif = pr;
                    cout << "? " << l << ' ' << r << '\n';
                    cout.flush();
                    cin >> pr;
                    --l;                }
                m[r - 1] = m[l];
            }
        }
        cout << "Ready!\n";
        cout << col << endl;
        for (int i = 0; i < n; ++i)
            cout << m[i] << ' ';
    }
    else
    {
        cout << "Ready!\n";
        cout << 1 << endl;
        cout << 1 << ' ';
    }


}
