-- local test = 123
local function query(x)
  io.write("? " .. x .. "\n")
  io.flush()
  if test then
    local f1 = tostring(x) <= tostring(test)
    local f2 = x <= test
    do return f1 == f2 end
  end
  local ret = io.read("*l")
  return ret == "Y"
end
local function ans(x)
  io.write("! " .. x .. "\n")
  io.flush()
  os.exit()
end
local function solve1(min, max)
  while 1 < max - min do
    local mid = (min + max) // 2
    if query(mid * 10) then
      max = mid
    else
      min = mid
    end
  end
  ans(max)
end
for i = 1, 9 do
  local lim = 1
  for j = 1, i do
    lim = lim * 10
  end
  local ret = query(lim)
  if not ret then
    solve1(lim // 10, lim - 1)
  end
end
do
  local tgt = 2
  for i = 0, 10 do
    if query(tgt) then
      ans(tgt // 2)
    end
    tgt = tgt * 10
  end
end
