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

public class B {

	public void solve() throws IOException {
    	int n = nextInt();
    	int[] a = new int[n];
    	Arrays.fill(a, -1);
    	
    	a[0] = 1;
    	TreeMap<Integer, Integer> m = new TreeMap<>();
    	m.put(0, 1);
    	for (int i = 1; i < n; i++) {
    		int sz = m.keySet().size();
    		int cnt = 0;
    		System.out.println("? 1 " + (i + 1));
    		int x = nextInt();
    		if (x > sz) {
    			a[i] = sz + 1;
    			m.put(i, sz + 1);
    			continue;
    		}
    		int y = -1;
    		int eee = -1;
    		for (int e : m.keySet()) {
				cnt++;
				System.out.println("? " + (e + 2) + " " + (i + 1));
				x = nextInt();
				if (x > sz - cnt) {
					y = m.get(e);
					a[i] = y;
					eee = e;
					break;
				}
			}
    		m.remove(eee);
    		m.put(i, y);
		}
    	
    	System.out.println("Ready!");
    	System.out.println(m.keySet().size());
    	for (int i = 0; i < a.length; i++) {
			System.out.print(a[i] + " ");
		}
    	
    }

    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 B().run();
    }

}