#include <bits/stdc++.h>

using namespace std;

int n,m,clr = 1;
long long c[3005],mp[3005];
set<long long> s;

void rec(int n,int l, int r,int &k){
    int ans;
    cout<<'?'<<" "<<l<<" "<<r<<endl;
    cin>>ans;
    cout.flush();

    k = ans;

    if(ans==1){
        for(int i=l;i<=r;i++)
            c[i] = clr;
        clr++;

     /*   cout<<endl<<"ans   ";
        for(int i=l;i<=r;i++)
            cout<<c[i]<<" ";
        cout<<endl<<endl;*/

    }else{
        int k1 = 0,k2 = 0;
        int mid = (l+r) / 2;
        rec(ans,l,mid,k1);
        //cout<<"er "<<r<<endl;
        rec(ans,mid+1,r,k2);

        //cout<<l<<" "<<r<<" "<<k1<<" "<<k2<<" "<<n<<endl;

        if(k1+k2 > ans){
            int er = (k1+k2) - ans;
            int q = c[l];
            s.clear();
            for(int i=l;i<=r;i++){
                if(c[i]==q) continue;
                s.insert(c[i]);
                if(s.size() == er) break;
            }
            for(it : s){
                mp[it] = q;
            }
        }



    }
}

void finish(){
    int mpp[30005];
    memset(mpp,0,sizeof(mpp));
    int j = 1,a;
    for(int i=1;i<=n;i++){
        a = c[i];
        if(mpp[a] == 0)
            mpp[a] = j,j++;
        c[i] = mpp[a];
    }
}

int main(){
    //freopen("video.in","r",stdin);
    //freopen("video.out","w",stdout);
    cin>>n;
    int k =0;

    memset(mp,0,sizeof(mp));

    rec(n,1,n,k);

    cout<<"Ready!"<<endl;

    s.clear();
    for(int i=1;i<=n;i++){
        if(mp[c[i]]!=0) c[i] = mp[c[i]];
        s.insert(c[i]);
    }
    cout<<s.size()<<endl;

      finish();

    for(int i=1;i<=n;i++){
        cout<<c[i]<<" ";
    }

}
