N,M,L=map(int,input().split()) l=1 r=10**9 while True: if l==r: break m=(l+r)//2 print('?',m,1,flush=True) t=int(input()) if t!=m: r=m else: l=m+1 result=pow(N,M**L,l) print('!',result,flush=True)