import sys,random,bisect from collections import deque,defaultdict from heapq import heapify,heappop,heappush from itertools import permutations from math import log,gcd input = lambda :sys.stdin.readline().rstrip() mi = lambda :map(int,input().split()) li = lambda :list(mi()) def query(y): print("? {}".format(y)) sys.stdout.flush() res = input() assert res!="-1" return res=="Yes" def answer(x): print("! {}".format(x)) sys.stdout.flush() for _ in range(int(input())): ok = 0 ng = log(12.22*10**74,10) for i in range(24): mid = (ok+ng)/2 if query(10**mid): ok = mid else: ng = mid print(10**ok)