import sys N = int(raw_input()) data = [[-2] * N for i in xrange(N)] for i in xrange(N): data[i][i] = 0 even = N % 2 == 0 pair = [[i + 1, N - i - 1 - even] for i in xrange((N - 1) / 2)] print pair 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 p == q == 0: continue p -= 1 q -= 1 if r == "=": data[p][q] = data[q][p] = 0 if r == ">": data[p][q] = 1 data[q][p] = -1 if r == "<": data[p][q] = -1 data[q][p] = 1 ans = [0] * N rank = sorted([[sum(data[i]), i] for i in xrange(N)]) for i in xrange(N): r = rank[i][1] ans[r] = i + 1 print "! " + " ".join(map(str, ans)) sys.stdout.flush()