#include <iostream>
#include <algorithm>
#include <fstream>
using namespace std;

int main()
{
    cin.tie(0);
    int kappa[3010];
    int i,j,n,t;
    int flag=0;
    cin>>n;
    kappa[0]=0;
    for (i=0;i<n-1;i++){
    cout<<"?"<<i+1<<" "<<i+2<<endl;
    cout.flush();
    cin>>t;
     if (t==1){ kappa[i+1]=kappa[i];} else { flag=1;kappa[i+1]=(kappa[i]+1)%2;
     }
    }
    cout<<"Ready!"<<endl;
    if (flag==0) {cout<<1<<endl;} else cout<<2<<endl;
    for (i=0;i<n-1;i++){
        cout<<kappa[i]+1<<" ";
    }
    cout<<kappa[n-1]+1<<endl;
    return 0;
}
