import core.bitop;
import std.algorithm;
import std.array;
import std.ascii;
import std.container;
import std.conv;
import std.format;
import std.math;
import std.random;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

int generate()
{
  Mt19937 gen;
  string str = __DATE__ ~ __TIME__;
  uint hash;
  foreach (c; str)
  {
    hash = (hash * 9) + c;
  }
  gen.seed(hash);
  return uniform(1, 1_000_000_000 + 1, gen);
}

enum SUBMIT = true;

bool test(long n)
{
  static if (SUBMIT)
  {
    return query(n);
  }
  else
  {
    enum N = generate();
    pragma(msg, N);
    enum strN = N.to!string;
    string strn = n.to!string;
    return (n <= N && strn <= strN) || (n > N && strn >= strN);
  }
}

bool query(T)(T n)
{
  writeln("? ", n);
  stdout.flush;
  auto ans = readln;
  return ans[0] == 'Y';
}

void main()
{
  long l = 1;
  long zero = 1;
  for (; zero.test && zero <= 10_000_000_000L; zero *= 10, ++l)
  {
  }
  --l;
  zero /= 10;
  long l2 = 1;
  for (long z = 2;;)
  {
    if (z.test)
    {
      break;
    }
    z *= 10;
    ++l2;
  }
  if (l == 11)
  {
    long ans = 1;
    foreach (i; 1 .. l2)
    {
      ans *= 10;
    }
    writeln("! ", ans);
    stdout.flush;
    return;
  }
  long left = zero;
  long right = zero * 10;
  while (right - left > 1)
  {
    long mid = (left + right) / 2;
    bool res = test(10 * mid);
    if (res)
    {
      right = mid;
    }
    else
    {
      left = mid;
    }
  }

  writeln("! ", right);
  stdout.flush;
}
