#include #include #include #include #include #include #include #include #include #include #define mkp make_pair #define mkt make_tuple #define rep(i,n) for(int i = 0; i < (n); ++i) #define all(v) v.begin(),v.end() using namespace std; typedef long long ll; const ll MOD=1e9+7; template void chmin(T &a,const T &b){if(a>b) a=b;} template void chmax(T &a,const T &b){if(a mp; int ask(int x){ if(mp.count(x)) return mp[x]; cout<<"?"<<" "<>s; if(s=="out") return mp[x]=0; else return mp[x]=1; } const int L=1e3; int main(){ vector pri(L+20,1); for(int i=2;i<=L+10;i++){ if(pri[i]==0) continue; for(int j=2;i*j<=L+10;j++) pri[i*j]=0; } vector prime={0}; for(int i=1;i<=L+10;i++) if(pri[i]) prime.push_back(i); int P=prime.size(); int ok=0,ng=P-1; while(abs(ok-ng)>2){ int mid=(ok+ng)/2; if(ask(prime[mid])) ok=mid; else{ if(ask(prime[mid+1])) ok=mid+1; else ng=mid+1; } } vector table; for(int i=prime[ok];i<=prime[ng];i++) table.push_back(i); ok=0;ng=table.size()-1; while(abs(ok-ng)>1){ int mid=(ok+ng)/2; if(ask(table[mid])) ok=mid; else{ if(ask(table[mid+1])) ok=mid+1; else ng=mid+1; } } int ans=table[ok]; cout<<"!"<<" "<