import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Created by roi on 07.04.2016.
 */
public class B {
    public void run(){
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = in.nextInt();
        boolean[] used = new boolean[n];
        int[] num = new int[n];
        num[0] = 1;
        int k = 1;
        for (int i = 0; i < n; i++){
            if (num[i] == 0){
                k++;
                num[i] = k;
            }
            if (i < n - 1){
                out.print("? ");
                out.print(i + 1);
                out.print(" ");
                out.print(n);
                out.println();
                out.flush();
                int r1 = in.nextInt();
                out.print("? ");
                out.print(i + 2);
                out.print(" ");
                out.print(n);
                out.println();
                out.flush();
                int r2 = in.nextInt();
                if (r1 == r2){
                    int l = i;
                    int r = n - 1;
                    while (l + 1 < r){
                        int m = (l + r)/2;
                        out.print("? ");
                        out.print(i + 1);
                        out.print(" ");
                        out.print(m + 1);
                        out.println();
                        out.flush();
                        int re1 = in.nextInt();
                        out.print("? ");
                        out.print(i + 2);
                        out.print(" ");
                        out.print(m + 1);
                        out.println();
                        out.flush();
                        int re2 = in.nextInt();
                        if (re1 > re2){
                            l = m;
                        }
                        else{
                            r = m;
                        }
                    }
                    num[r] = num[i];
                }
            }
        }
        out.println("Ready!");
        out.println(k);
        for (int i = 0; i < n - 1; i++){
            out.print(num[i]);
            out.print(" ");
        }
        out.println(num[n - 1]);
        out.flush();
    }
    public static void main(String[] args) {
        new B().run();
    }
}
