import sys import math def Q(nums): print("?", end=" ") for num in nums: print(num, end=" ") print() sys.stdout.flush() def A(nums): print("!", end = " ") for num in nums: if num is 0: break print(num, end=" ") print() n = int(input()) n*=2 array = [0]*n for i in range(int(n/2)): array[i] = i+1 for count in range(n): off = ((count%2)) Q([0] + array[off:] if off == 1 else array) res = list(map(str, input().split())) for j in range(math.ceil(n/2.0)): if res[j] == ">" and array[2*j+1+off] != 0: array[2*j+off], array[2*j+1+off] = array[2*j+1+off], array[2*j+off] print(array) A(array)