from functools import cmp_to_key import sys def solve(): N = int(input()) a = list(range(N)) m = [[0] * N for _ in range(N)] def parse(ans, qs): for a, q in zip(ans, qs): l, r = q if a == '<': m[l][r] = -1 m[r][l] = 1 else: m[l][r] = 1 m[r][l] = -1 for step in range(1, N): used = [0] * N qs = [] qa = ['?'] for i in range(N): j = (i + step) % N if used[i] == 0 and used[j] == 0: qs.append((i, j)) qa.append(str(i + 1)) qa.append(str(j + 1)) used[i] = used[j] = 1 print(' '.join(qa) + ' 0' * (N * 2 - len(qs) * 2)) sys.stdout.flush() ans = input().split() parse(ans, qs) @cmp_to_key def cmp(l, r): return m[l][r] a.sort(key=cmp) print('! ' + ' '.join(map(lambda i: str(i + 1), a))) if __name__ == '__main__': solve()