import bisect

class Node:
    def __init__(self, x):
        self.x = x

    def __lt__(self, o):
        print('?',self.x,o.x,flush=True)
        return int(input()) == self.x

n, k = map(int, input().split())

topk = []
for i in range(1, n+1):
    # Note: could use key=Node here, but my problemtools docker is old
    bisect.insort(topk, Node(i))
    if len(topk) > k: del topk[-1]

print('!',*[s.x for s in topk])
