N = int(input()) rank = [0] * N even = N // 2 * 2 A = list(range(0, even // 2)) B = list(range(even // 2, even)) for t in range(even - 1): Q = [] A, B = B[:1] + A[:-1], B[1:] + A[-1:] for i in range(N): if i < len(A): Q.append(A[i] + 1) Q.append(B[i] + 1) else: Q.append(0) Q.append(0) print("?", " ".join(str(v) for v in Q), flush=True) res = input().split() for i in range(N): if Q[i * 2] != 0: if res[i] == ">": rank[Q[i * 2 + 0] - 1] += 1 elif res[i] == "<": rank[Q[i * 2 + 1] - 1] += 1 if N > 1 and N % 2 == 1: for i in range(N - 1): print("?", i + 1, N, " ".join(["0"] * (2 * N - 2)), flush=True) res = input().split()[0] if res == ">": rank[i] += 1 elif res == "<": rank[N - 1] += 1 ans = sorted(range(N), key=lambda i: rank[i]) print("!", " ".join(str(a + 1) for a in ans), flush=True)