#include <iostream>
#include <vector>
#include <set>

using namespace std;
int get(int l, int r) {
    cout << "? " << l << " " << r << endl;
    int ans;
    cin >> ans;

    return ans;
}


int main() {
    int n, r, nr;
    cin >> n;
    vector<int> ans(n + 1);

    if (n == 1) {
        cout << "Ready!\n1\n1";
        return 0;
    }

    cout << "? 1 2" << endl;
    cin >> r;

    vector<int> same(n + 1);


    int last = 0;
    if (r == 1) {
        ans[1] = 1;
        ans[2] = 1;
        last = 1;

        same[2] = 1;
    } else {
        ans[1] = 1;
        ans[2] = 2;
        last = 2;

    }


    for (int i = 3; i <= n; ++i) {
        cout << "? 1 " << i << endl;
        cin >> nr;

        if (nr != r) {
            ans[i] = last + 1;
            last++;
            r = nr;

        } else {
            set<int> arr;
            vector<int> cnt(i + 1);

            arr.clear();
            cnt.clear();

            arr.insert(ans[i - 1]);

            for (int now = i - 2; now > 0; --now) {
                 if (arr.find(ans[now]) != arr.end()) {
                    cnt[i] = cnt[i + 1] + 1;
                    continue;
                }
                cnt[i] = cnt[i + 1];
                arr.insert(ans[now]);
            }



            int ll = 1, rr = i;
            while (rr - ll > 1) {
                int mid = (rr + ll) / 2;
                int x = get(mid, i);
                cout << "!" << x << " + " << cnt[mid] << " = " << i << " " << mid << " "  << 1 << endl;

                if (x + cnt[mid] != i - mid + 1)
                    ll = mid;
                else
                    rr = mid;
            }


            ans[i] = ans[ll];
            r = nr;

        }
    }

    cout << "Ready!" << endl;
    cout << last << endl;
    for (int i = 1; i <= n; ++i)
        cout << ans[i] << " ";

    return 0;
}
