#include using namespace std; int main(){ int tv = 0; int fv = 1000; while (fv - tv > 1){ int mid = (tv + fv) / 2; cout << "? " << mid << endl; string S1; cin >> S1; cout << "? " << mid + 1 << endl; string S2; cin >> S2; if (S1 == "out" && S2 == "out"){ fv = mid; } else { tv = mid; } } int ans = tv; while (1){ cout << "? " << ans << endl; string S; cin >> S; if (S == "out"){ ans--; } else { break; } } cout << "! " << ans << endl; }