#include <bits/stdc++.h>

using namespace std;

#define all(v) (v).begin(), (v).end()

typedef long long li;

li secret = -1;
int nQueries;

bool query(li x)
{
    nQueries++;
    //assert(nQueries <= 64);
    assert(x >= 1 && x <= (li)1e18);
    
    if (secret == -1)
    {
        cout << "? " << x << endl;
        string ans;
        cin >> ans;
        assert(ans == "Y" || ans == "N");
        return ans == "Y";
    }
    else
    {
        bool a = x <= secret;
        bool b = to_string(x) <= to_string(secret);
        //printf("query %lld -> %d (%d %d)\n", x, a == b, a, b);
        return a == b;
    }
}

li as_string(string x)
{
    istringstream is(x);
    li y;
    is >> y;
    assert(to_string(y) == x);
    return y;
}

bool query(string x)
{
    //printf("%s\n", x.c_str());
    return query(as_string(x));
}

li guess()
{
    if (query(1e10))
    {
        // 1, 10, ... 10^9
        
        string pref = "";
        for (int i = 0; i <= 10; i++)
            if (query(pref + "2"))
            {
                string ans = "1";
                for (int j = 0; j < i; j++)
                    ans += "0";
                return as_string(ans);
            }
            else
                pref += "1";
            
        assert(false);
    }
    
    int length = 0;
    
    {
        li x = 1e10;
        for (int t = 10; t >= 0; t--)
        {
            if (query(x))
            {
                length = t + 1;
                break;
            }
            x /= 10;
        }
    }
    assert(length >= 0);
    
    li low = 1;
    for (int i = 0; i < length - 1; i++) low *= 10;
    li high = low * 10;
    
    // ask x + 00000 -> yes iff x > num
    // NO ... YES
    
    while (low + 1 != high)
    {
        li m = (low + high) / 2;
        if (query(to_string(m) + "000000000"))
            high = m;
        else
            low = m;
    }
    return high;
    
    //if (query(100) && query(10) && query(1))
    //    return 1;
    
    string prefix = "";
    for (int t = 0; t < 9; t++)
    {
        bool last_digit = t == length - 1;
        
        if (last_digit)
        {
            // query(prefix + x + 0) is YES if x >= digit
            // NO ... YES
            
            int low = 0, high = 10;
            if (t == 0)
                low = 1;
            
            while (low + 1 != high)
            {
                int m = (low + high) / 2;
                if (query(prefix + to_string(m) + "0"))
                    high = m;
                else
                    low = m;
            }
            printf("low %d high %d\n", low, high);
            
            prefix += to_string(high);
            break;
        }
        else
        {
            printf("prefix '%s' NOT LAST\n", prefix.c_str());
            // query (prefix + x) is YES if x <= digit
            // YES .. NO
            int low = 0, high = 10;
            if (t == 0)
                low++;
            
            while (low + 1 != high)
            {
                int m = (low + high) / 2;
                if (query(m))
                    low = m;
                else
                    high = m;
            }
            
            prefix += to_string(low);
        }
    }
    
    return as_string(prefix);
}

int main()
{
    /*for (li i = 1; i <= (li)1e10; i *= 10)
    {
        secret = i;
        if (query(112))
            printf("%d\n", i);
    }
    return 0;*/
    
#if 0
    for (int i = 1; i <= 10000000; i++)
    {
        secret = i;
        int g = guess();
        //printf("secret %d -> guess %d\n", secret, g);
        assert(g == secret);
        
        //if (g != secret)
        //    wrong.push_back(secret);
    }
#endif
    
    //ios_base::sync_with_stdio(false);
    //cin.tie(0);
    
    li x = guess();
    cout << "! " << x << endl;
    return 0;
    
    /*
    vector<int> wrong;
    for (int i = 1; i <= 1000; i++)
    {
        secret = i * (li)1e6;
        int g = guess();
        //printf("secret %d -> guess %d\n", secret, g);
        //assert(g == secret);
        
        if (g != secret)
            wrong.push_back(secret);
    }
    
    printf("wrong:\n");
    for (int x: wrong) printf("%d ", x);
    printf("\n");*/
    
    return 0;
}

Measured memory_bytes: 696