N = int(input()) if N == 1: print('!', 1, 1) exit() def list_primes(limit): primes = [] is_prime = [True] * (limit + 1) is_prime[0] = False is_prime[1] = False for p in range (0, limit + 1): if not is_prime[p]: continue primes.append(p) for i in range(p*2, limit + 1, p): is_prime[i] = False return primes P = list_primes(N)[-1] def query(i, j): print("?", i, j) z = int(input()) return z A = [-1] * (N + 1) B = [-1] * (N + 1) p_idx = [] for i in range(1, N + 1): z = query(i, i) if z % P == 0: p_idx.append(i) x = y = -1 # A[x] = B[y] = P if len(p_idx) == 1: x = y = p_idx[0] else: z = query(p_idx[0], p_idx[1]) if z % P == 0: x = p_idx[0] y = p_idx[1] else: y = p_idx[0] x = p_idx[1] A[x] = B[y] = P # A[i], B[y] for i in range(1, N + 1): if i == x : continue z = query(i, y) A[i] = z // P # A[x], B[i] for i in range(1, N + 1): if i == y : continue z = query(x, i) B[i] = z // P print("!", *A[1:], *B[1:])