from collections import defaultdict N=int(input()) i=0 dct=defaultdict(list) PQ=[] for j in range(1,N**2-N): print("?",i+1,j+1) p,q=map(int,input().split()) dct[(p,q)].append(j) PQ.append((p,q)) PQ.sort() X,Y=[None]*(N*N-N),[None]*(N*N-N) for x in range(1,N): for y in range(N): lst=[] for xx in range(1,N): for yy in range(N): if x==xx and y==yy: continue p,q=x-xx,y-yy if p>q: p,q=q,p lst.append((p,q)) lst.sort() if lst==PQ: X[i]=x Y[i]=y break else: continue break else: assert False for (p,q),lst in dct.items(): if len(lst)==1: j=lst[0] for xx,yy in ((x-p,y-q),(x-q,y-p)): if 1<=xx