memo={} def query(i,j): if (i,j) in memo: return memo[(i,j)] print("?",i+1,j+1) retu=int(input()) memo[(i,j)]=retu return retu N=int(input()) if N==1: print("!",1,1) exit() for p in range(N,1,-1): if all(p%i for i in range(2,p)): break lcm=[] for i in range(N): lcm.append(query(i,i)) idx=[i for i in range(N) if lcm[i]%p==0] if len(idx)==1: a,b=idx[0],idx[0] else: i,j=idx for a,b in ((i,j),(j,i)): if query(a,b)%p==0: break A=[None]*N B=[None]*N for i in range(N): if i==a: continue A[i]=query(i,b)//p for j in range(N): if j==b: continue B[j]=query(a,j)//p A[a]=p B[b]=p print("!",*A,*B)