{$MAXSTACKSIZE $11110000}
uses Math,SysUtils;
type mass=array[0..3000] of longint;
     maxx=array[0..3000,0..3000] of longint;
var ee,a,b,l,k2,r,c,i,k1,n,k,z:longint;
    res,m,used:mass;
    m1:maxx;
function count(i,j:longint):longint;
var aa,z:longint;
Begin
   aa:=0;
   for z:=1 to n do
      if m1[i,z]-m1[j-1,z]>0
      then inc(aa);
   count:=aa;
end;
begin
  // assign(input,'input.txt');
  // assign(output,'output.txt');
   readln(n);
   if n=1
   then Begin
           writeln('Ready!');
           writeln(1);
           writeln(1);
           flush(output);
           halt(0);
        end;
   res[1]:=1;
   ee:=0;
   m1[1,1]:=1;
   for i:=2 to n do
      Begin
          l:=1;
          r:=i-1;
          k2:=i;
          while l<=r do
             Begin
                 k1:=(l+r) div 2;
                 if ee>71000
                 then halt(1);
                 writeln('? ',k1,' ',i);
                 flush(output);
                 readln(a);
               //  writeln('? ',k1,' ',i-1);
               //  flush(output);
              //   readln(b);
                 b:=count(i-1,k1);
                 inc(ee,2);
                 if a<>b
                 then Begin
                         k2:=k1;
                         r:=k1-1;
                      end
                 else l:=k1+1;
             end;
          if k2=1
          then Begin
                  k:=0;
                  for z:=1 to i-1 do
                     k:=max(k,res[z]);
                  res[i]:=k+1;
               end
          else res[i]:=res[k2-1];
          m1[i]:=m1[i-1];
          inc(m1[i,res[i]]);
      end;
   writeln('Ready!');
   k:=0;
   for i:=1 to n do
      k:=max(k,res[i]);
   writeln(k);
   for i:=1 to n do
      write(res[i],' ');
   writeln;
   flush(output);
end. 
