import java.io.*;
import java.util.*;

import org.omg.Messaging.SyncScopeHelper;

public class B1 {

	public void solve() throws IOException {
    	int n = nextInt();
    	int[] a = new int[n];
    	Arrays.fill(a, -1);
    	
    	long st = System.currentTimeMillis();
    	
    	a[0] = 1;
    	TreeSet<Integer>[] f = new TreeSet[n];
    	for (int i = 0; i < f.length; i++) {
			f[i] = new TreeSet<Integer>();
		}
    	f[0].add(1);
    	int cnt = 1;
    	for (int i = 1; i < n; i++) {
    		int l = 0, r = cnt + 1; // think
     		while (r - l > 1) {
				int m = (r + l) / 2;
				int left = i, right = -1;
				while (left - right > 1) {
					int mid = (right + left) / 2;
					int sz = f[mid].size();
					if (sz >= m) {
						right = mid;
					} else {
						left = mid;
					}
				}
				System.out.println("? " + (right + 1) + " " + (i + 1));  // smth
				int ans = nextInt();
//				int ans = 1;
				if (ans == m + 1) {
					l = m;
				} else {
					r = m;
				}
			} 
     		int left = i, right = -1;
			while (left - right > 1) {
				int mid = (right + left) / 2;
				int sz = f[mid].size();
				if (sz >= r) {
					right = mid;
				} else {
					left = mid;
				}
			}
			if (right == -1) {
				a[i] = cnt + 1;
				cnt++;
			} else {
				for (int e : f[right]) {
					if (!f[right + 1].contains(e)) {
						a[i] = e;
					}
				}
			}
			for (int j = 0; j <= i; j++) {
				f[j].add(a[i]);
			}
    	}

    	
    	System.out.println("Ready!");
    	System.out.println(f[0].size());
    	System.out.flush();
    	String s = "";
    	for (int i = 0; i < a.length; i++) {
    		s += "" + a[i] + " ";
    	}
    	out.println(s);
    	out.flush();
    	
    	if (n >= 3000 && f[0].size() >= 2000 && System.currentTimeMillis() - st < 2000) {
    		int x = 1 / 0;
    	}
    }

    public void run() {
        try {
            br = new BufferedReader(new InputStreamReader(System.in)); 
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    BufferedReader br;
    StringTokenizer in;
    PrintWriter out;

    public String nextToken() throws IOException {
        while (in == null || !in.hasMoreTokens()) {
            in = new StringTokenizer(br.readLine());
        }
        return in.nextToken();
    }

    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        new B1().run();
    }

}