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(string s)
{
  static if (SUBMIT)
  {
    return query(s);
  }
  else
  {
    return test(s.to!long);
  }
}

bool test(long n)
{
  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(string n)
{
  static int cnt = 0;
  ++cnt;
  if (cnt > 64)
  {
    int[] a = new int[1];
    a[2] = 2;
  }
  writeln("? ", n);
  stdout.flush;
  auto ans = readln;
  return ans[0] == 'Y';
}

void main()
{
  string ans = "";
  foreach (i; 0 .. 10)
  {
    int left = 0;
    int right = 10;
    while (right - left > 1)
    {
      int mid = (left + right) / 2;
      string sub = ans ~ (mid.to!string);
      bool res = test(sub);
      // bool res = query(sub);
      if (res)
      {
        left = mid;
      }
      else
      {
        right = mid;
      }
    }
    if (left == 9)
    {
      int hidari = 0;
      int migi = 10;
      while (migi - hidari > 1)
      {
        int mannnaka = (hidari + migi) / 2;
        string sub = ans ~ (mannnaka.to!string) ~ "0";
        bool res = test(sub);
        // bool res = query(sub);
        if (!res)
        {
          hidari = mannnaka;
        }
        else
        {
          migi = mannnaka;
        }
      }
      if (hidari == 0 && test(ans ~ "00"))
      {
        // if (hidari == 0 && query(ans ~ "00")) {
        ans ~= '9';
        continue;
      }
      ans ~= migi.to!string;
      break;
    }
    ans ~= left.to!string;
  }
  writeln("! ", ans);
  stdout.flush;
}
