import java.util.*;

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

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

        HashMap<Integer, Integer> cache = new HashMap<>();

        PriorityQueue<Integer> topk = new PriorityQueue<>(new Comparator<>() {
            public int compare(Integer a, Integer b) {
                int key = a*n + b;
                if (cache.containsKey(key)) return cache.get(key);
                System.out.println("? " + a + " " + b);
                System.out.flush();
                int ans = in.nextInt() == b ? -1 : 1;
                cache.put(key, ans);
                return ans;
            }
        });

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

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