//#define LOCAL

#include <map>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <vector>
#include <numeric>
#include <algorithm>
#include <iostream>
#include <string>
#include <cstring>
#include <sstream>
#include <functional>
#include <queue>
#include <deque>
#include <stack>
#include <cmath>
#include <iomanip>

using namespace std;

// From Errichto's Youtube stream
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

using int64 = long long;

/////////////////////
// Code starts here//
/////////////////////
int M;

bool Query(int64 N) {
    cout << "? " <<  N << "\n";
    cout.flush();

    if (!M) {
        string ans;
        cin >> ans;
        return ans == "Y" ? true : false;
    } else {
        stringstream mm;
        mm << M;
        stringstream nn;
        nn << N;
        return ((N <= M && nn.str() <= mm.str()) || (N > M && nn.str() > mm.str()));
    }
}

void Answer(int64 N) {
    cout << "! " << N << "\n";
    cout.flush();
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    //M = 1000000000;

    int nr_digits = 0;
    int64 tmp = 0;
    for (int i = 1; i <= 10; i++) {
        if (i == 1)
            tmp = tmp * 10 + 1;
        else
            tmp = tmp * 10;

        debug() << "? " << tmp;
        if (!Query(tmp)) {
            nr_digits = i - 1;
            break;
        }
    }

    if (!nr_digits) {
        if (Query(9)) {
            Answer(1);
            debug() << "Spec ans: " << 1;
            return 0;
        }

        tmp = 1;
        for (int i = 2; i <= 10; i++) {
            tmp = 10 * tmp + 1;

            if (Query(tmp)) {
                tmp = 1;
                for (int j = 2; j <= i; j++)
                    tmp = tmp * 10;
                Answer(tmp);
                debug() << "ans: " << tmp;
                return 0;
            }
        }
    }

    debug() << "nr_digits: " << nr_digits;

    if (nr_digits == 1) {
        for (int i = 1; i <= 9; i++) {
            if (Query(i * 10)) {
                Answer(i);
                debug() << "* 10: " << i;
                return 0;
            }
        }
    }

    int l = 0, r = 0, m = 0, sol;
        
    int64 pref = 0;

    for (int i = 1; i < nr_digits; i++) {
        if (i == 1) {
            l = 1, r = 9;
        } else {
            l = 0, r = 9;
        }

        while (l <= r) {
            m = (l + r) >> 1;

            int64 cand = pref * 10 + m;
            //debug() << i << " " << m << "\n";
            if (Query(cand)) {
                l = m + 1;
                sol = m;
            } else {
                r = m - 1;
            }
        }

        pref = pref * 10 + sol;
    }

    debug() << "pref: " << pref;

    // Last digit

    if (Query(pref * 100)) {
        Answer(pref * 10);
        debug() << "* 100: " << pref * 10 << "\n";
        return 0;
    }

    sol = 0;
    for (m = 1; m <= 9; m++) {
        int64 cand = pref * 100 + 10 * m;
        //debug() << i << " " << m << "\n";
        if (Query(cand)) {
            sol = m;
            break;
        }
    }

    pref = pref * 10 + sol;

    Answer(pref);
    debug() << "final: " << pref;

    return 0;
}


Measured memory_bytes: 632