import sys input = sys.stdin.readline def isprime(n): if n <= 1: return False elif n == 2: return True elif n % 2 == 0: return False A = [2, 325, 9375, 28178, 450775, 9780504, 1795265022] s = 0 d = n - 1 while d % 2 == 0: s += 1 d >>= 1 for a in A: if a % n == 0: return True x = pow(a, d, n) if x != 1: for t in range(s): if x == n - 1: break x = x * x % n else: return False return True n=int(input()) if n==1: print("!",1,1,flush=True) exit() for i in range(n,0,-1): if isprime(i): x=i break l=[] for i in range(n): print("?",1,i+1,flush=True) l.append(int(input())) cnt=0 for i in range(n): if l[i]%x==0: cnt+=1 idx=i if cnt==n: B=[] for i in l: B.append(i//x) for i in range(n): if B[i]==x: idx=i break A=[] for i in range(n): print("?",i+1,idx+1,flush=True) A.append(int(input())//x) A+=B print("!",*A,flush=True) exit() A=[] for i in range(n): print("?",i+1,idx+1,flush=True) A.append(int(input())//x) for i in range(n): if A[i]==x: idx=i break B=[] for i in range(n): print("?",idx+1,i+1,flush=True) B.append(int(input())//x) A+=B print("!",*A,flush=True) exit()