import java.util.*;

public class collections_sort_ls {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        int n = in.nextInt();
        int k = in.nextInt();

        ArrayList<Integer> order = new ArrayList();

        for (int i=1;i<=n;++i) order.add(i);

        Collections.sort(order, new Comparator<>() {
            public int compare(Integer a, Integer b) {
                if (a == b) return 0;
                System.out.println("? " + a + " " + b);
                System.out.flush();
                int res = in.nextInt();
                if (res == -1) System.exit(0);
                return res == b ? -1 : 1;
            }
        });

        System.out.print("!");
        for (int i=0;i<k;++i) System.out.print(" " + order.get(n-1-i));
        System.out.println();
    }
}