import java.util.*;

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

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

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

        PriorityQueue<Integer> topk = new PriorityQueue<>(comp);

        for (int i=1;i<=n;++i) {
            if (topk.size() < k) {
                topk.add(i);
            } else if (comp.compare(topk.peek(), i) < 0) {
                topk.poll();
                topk.add(i);
            }
        }

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