program ProjectB;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var n, i, t, j : longint;
    res, kol : array[1..3000] of longint;
    cur, prev : longint;
    gr, nm : longint;
    used : array[1..3000] of boolean;

begin

  readln(n);

  if n = 1 then
    begin
      writeln('Ready!');
      writeln(1);
      writeln(1);
      flush(output);
      exit;
    end;

  res[1] := 1;
  kol[1] := 1;

  writeln('? 1 2');
  flush(output);

  readln(kol[2]);
  if kol[2] = 1 then
    begin
      res[2] := 1;
      t := 1;
    end
  else
    begin
      res[2] := 2;
      t := 2;
    end;

  for i := 3 to n do
  begin
    writeln('? 1 ', i);
    flush(output);
    readln(kol[i]);

     if kol[i] = kol[i-1]+1 then
      begin
        res[i] := t+1;
        inc(t);
        continue;
      end;

    writeln('? ', i-1, ' ', i);
    flush(output);

    readln(cur);
    if cur = 1 then
      begin
        res[i] := res[i-1];
        continue;
      end;

    prev := kol[i];

    for nm := 1 to t do
      used[nm] := False;

    nm := i-1;
    gr := 1;
    used[res[nm]] := True;
    while nm > 1 do
    begin
      dec(nm);
      if res[nm] <> res[nm+1] then
        begin
          if not(used[res[nm]]) then
            begin
              inc(gr);
              used[res[nm]] := True;
              writeln('? ', nm, ' ', i);
              flush(output);
              readln(cur);
              if cur = gr then
                begin
                  res[i] := res[nm];
                  break;
                end;
            end;
        end;
      if gr = t-1 then
        begin
          for cur := 1 to t do
            if not(used[cur]) then
              begin
                res := cur;
                break;
              end;
          break;
        end;
    end;

  end;

  writeln('Ready!');
  writeln(t);
  for i := 1 to n do
    write(res[i], ' ');
  flush(output);
//  readln;
end.
