import sys sys.set_int_max_str_digits(100000) n = int(input()) v = 1 for i in range(n): v *= i + 1 def make(mid): tmp = [0] * n used = [False] * n cur = mid c = v for i in range(n): c /= n - i for j in range(n): if used[j]: continue if cur - c < 0: tmp[i] = j + 1 break cur -= c used[tmp[i] - 1] = True return tmp ok, ng = 0, v while ok + 1 < ng: mid = (ok + ng) // 2 print("?", *make(mid), flush=True) if input() == "1": ok = mid else: ng = mid print("!", *make(ok), flush=True)