import sys N = int(raw_input()) rank = [1] * N even = N % 2 == 0 pair = [[i + 1, N - i - 1 - even] for i in xrange((N - 1) / 2)] for i in xrange(N - even): qs = [[(p + i) % (N - even) + 1, (q + i) % (N - even) + 1] for p, q in pair] + ([[i + 1, N]] if even else []) qs += [[0, 0] for i in xrange(N - len(qs))] query = "? " + " ".join([str(p) + " " + str(q) for p, q in qs]) print query sys.stdout.flush() rs = raw_input().split() for i, r in enumerate(rs): p, q = qs[i] if r == ">": rank[p - 1] += 1 if r == "<": rank[q - 1] += 1 ans = [0] * N for i, r in enumerate(rank, 1): ans[r] = i print "! " + " ".join(map(str, ans)) sys.stdout.flush()