#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<<" "<<ans<<endl;

        if(k1+k2 > ans){
              //  cout<<"put "<<l<<" "<<r<<endl;
            int er = (k1+k2) - ans;
            unordered_set<int> cont;

            int md = (l+r) / 2;

            for(int i=l;i<=mid;i++)
                cont.insert(c[i]);
            int t[3005];
            memset(t,0,sizeof(t));
            for(int i=mid+1;i<=r;i++){
                if(t[c[i]] !=0){ c[i] = t[c[i]]; continue;}
                if(t[c[i]] == 0)
                    if(er <= 0) continue;
                else
                    t[c[i]] = *cont.begin(),
                    cont.erase(t[c[i]]),
                    c[i] = t[c[i]],
                    er--;
            }
        }
    }
}

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<<"eww "<<endl;
    for(int i=1;i<=n;i++){
        cout<<c[i]<<" ";
    }
    cout<<endl;
*/
    cout<<"Ready!"<<endl;
    cout.flush();
    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;
    cout.flush();
/*
    cout<<"eww "<<endl;
    for(int i=1;i<=n;i++){
        cout<<c[i]<<" ";
    }
    cout<<endl;
*/
      finish();

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

}
