Var
  n,k,tk,ouk,j,i:longint;
  an:array[1..3000]of longint;
  ou:array[1..3000]of boolean;
Function makez(i,j:longint):longint;
Var
  a:longint;
begin
  writeln('? ',i,' ',j);
  flush(output);
  readln(a);
  makez:=a;
end;
begin
//  assign(input,'input.txt');assign(output,'output.txt');
  readln(n);
  k:=makez(1,n);
  {if k=1 then
    begin
      writeln('Ready!');
      writeln(k);
      for i:=1 to n do
        write(1,' ');
      writeln;
      flush(output);
      exit;
    end;    }
  tk:=1;
  an[1]:=1;
  for i:=2 to n do
    begin
      if makez(1,i)=tk+1 then
        begin
          an[i]:=tk+1;
          inc(tk);
          continue;
        end;
      for j:=1 to k do
        ou[j]:=false;
      ouk:=0;
      for j:=i-1 downto 1 do
        begin
          if not ou[an[j]] then
            begin
              inc(ouk);
              ou[an[j]]:=true;
              if makez(j,i)=ouk then
                begin
                  an[i]:=an[j];
                  break;
                end;
            end;
        end;
    end;
  writeln('Ready!');
  writeln(k);
  for i:=1 to n do
    write(an[i],' ');
  writeln;
  flush(output);
end.
