I,P,E=input,print,exit N=int(I()) y=0 if N==3: P("?",0,0) y=int(I()) P("!",y*2%3),E(0) if N==5: P("?",1,0) y=int(I()) P("?",y,0) z=int(I()) P("!",1-y if y<2 else y if z<1 else 9-y-z),E(0) if N==7: P("?",1,0) y=int(I()) P("?",y,0) z=int(I()) P("?",z,y) w=int(I()) P("!",1-y if y<2 else y if z<1 else z if w<1 else 20-y-z-w),E(0) while N%2<1: P("?",y,y) y=int(I()) N//=2 x,N=y,N-1 while N: if N%2: P("?",x,y) x=int(I()) N=N//2 if N: P("?",y,y) y=int(I()) P("!",x)