#include using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define ALL(v) begin(v),end(v) template inline bool chmax(A & a, const B & b) { if (a < b) { a = b; return true; } return false; } template inline bool chmin(A & a, const B & b) { if (a > b) { a = b; return true; } return false; } using ll = long long; using pii = pair; constexpr ll INF = 1ll<<30; constexpr ll longINF = 1ll<<60; constexpr ll MOD = 1000000007; constexpr bool debug = false; //---------------------------------// int main() { auto query = [](int q) -> bool { cout << "? " << q << endl; string res; cin >> res; return res == "out"; }; int ans = 0; int l = -1, r = 1000; while (r - l > 1) { int m = (l + r) >> 1; bool a = query(m - 1); bool b = query(m); if (!a) chmax(ans, m - 1); if (!b) chmax(ans, m); if (a & b) r = m; else l = m; } if (!query(r)) chmax(ans, r); printf("! %d\n", ans); }