def oi(): return int(input()) def os(): return input().rstrip() def mi(): return list(map(int, input().split())) # import sys # input = sys.stdin.readline # import sys # sys.setrecursionlimit(10**8) # import pypyjit # pypyjit.set_param('max_unroll_recursion=-1') input_count = 0 N = oi() out = ["!"] sets = set(range(1,N+1)) for i in range(N-1): print(f"? {i+1} {i+1}") temp = oi() out.append(str(temp)) sets.remove(temp) out.append(list(sets)[0]) print(" ".join(out))