import java.util.*;

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

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

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

        for (int i=1;i<=n;++i) {
            topk.add(i);
            if (topk.size() > k) topk.pollFirst();
        }

        System.out.print("!");
        for (Integer x : topk) System.out.print(" " + x);
        System.out.println();
    }
}