#include <bits/stdc++.h>

using namespace std;

const int maxn=(int)1e3+5;
int answer,n,a[maxn],k,c[maxn][maxn];

void findans(int pos)
{
    for(int i=pos-1;i>=0;i--)
    {
        cout << "? " << i+1 << " " << pos+1 << endl;
        cin >> answer;
        c[i][pos]=answer;
        if(i==pos-1&&answer==1)
        {
            a[pos]=a[pos-1];
            return;
        }
        if(answer==c[i][pos-1])
        {
            a[pos]=a[i];
            return;
        }
    }
    a[pos]=k+1;
    k++;
}

int main()
{
    cin >> n;
    a[0]=1;
    k=1;
    for(int i=1;i<n;i++)
        findans(i);
    cout << "Ready!" << endl;
    cout << k << endl;
    for(int i=0;i<n;i++)
        cout << a[i];
    return 0;
}
