#include using namespace std; bool angry(int N){ cout << "? " << N << endl; string s; cin >> s; return (s == "out"); } int main(){ int ok = 0, ng = 1000; while(ng-ok>1){ int mid = (ng+ok)/2; (angry(mid) && angry(mid+1) ? ng : ok) = mid; } cout << "! " << ok << endl; return 0; }