import sys input = sys.stdin.readline from collections import Counter A=[] for i in range(10): print("?","A",flush=True) ret=int(input()) print(ret, file=sys.stderr, flush=True) A.append(ret) B=[] for i in range(10): print("?","B",flush=True) ret=int(input()) print(ret, file=sys.stderr, flush=True) B.append(ret) CA=Counter(A) A0=CA.most_common()[0][0] CB=Counter(B) B0=CB.most_common()[0][0] while True: print("+","C","C","A",flush=True) ret=int(input()) print(ret, file=sys.stderr, flush=True) A=[] for i in range(5): print("?","A",flush=True) print(ret, file=sys.stderr, flush=True) ret=int(input()) A.append(ret) if ret!=0: break CA=Counter(A) A=CA.most_common()[0][0] if CA.most_common()[0][1]>=5 and A==0: break count=0 NOW=[0,B0,0] if A0%2==0: while count=5 and A==NOW[1]+NOW[2]: NOW[0]=NOW[1]+NOW[2] count+=1 break else: while True: print("+","A","B","C",flush=True) ret=int(input()) print(ret, file=sys.stderr, flush=True) C=[] for i in range(5): print("?","C",flush=True) ret=int(input()) print(ret, file=sys.stderr, flush=True) C.append(ret) if ret!=NOW[0]+NOW[1]: break CC=Counter(C) C=CC.most_common()[0][0] if CC.most_common()[0][1]>=5 and C==NOW[0]+NOW[1]: NOW[2]=NOW[0]+NOW[1] count+=1 break else: while count=5 and A==NOW[1]+NOW[2]: NOW[0]=NOW[1]+NOW[2] count+=1 break else: while True: print("+","A","B","C",flush=True) ret=int(input()) print(ret, file=sys.stderr, flush=True) C=[] for i in range(5): print("?","C",flush=True) ret=int(input()) print(ret, file=sys.stderr, flush=True) C.append(ret) if ret!=NOW[0]+NOW[1]: break CC=Counter(C) C=CC.most_common()[0][0] if CC.most_common()[0][1]>=5 and C==NOW[0]+NOW[1]: NOW[2]=NOW[0]+NOW[1] count+=1 break print("!","C",flush=True)