import sys N = int(raw_input()) W = [i + 1 for i in xrange(N)] Dummy = [0] * N turn = 0 while turn < N * N: start = 0 start = turn % 2 last = start + N if N % 2 == 0 and start == 1: last = max(2, start + N - 2) ask = " ".join(map(str, W[start:last])) ask += " " ask += " ".join(map(str, Dummy[:2 * N - last])) if start == 1: ask += " 0" print "?", ask sys.stdout.flush() results = raw_input().split() for i, res in enumerate(results): j = 2 * i + start if j + 1 >= N: break if res == ">": W[j], W[j + 1] = W[j + 1], W[j] turn += 1 print "!", " ".join(map(str, W))