#include using namespace std; int main(){ int mn = 0; int mx = 1001; while(mx-mn > 1){ int ce = (mn+mx)/2; cout << "? " << ce << endl; string s;cin>>s; if(s == "safe"){ mn = ce; }else{ cout << "? " << ce+1 << endl; cin>>s; if(s == "safe"){ mn = ce+1; }else{ mx = ce; } } } cout << "! " << mn << endl; }