#include<bits/stdc++.h>
#if not defined(ONLINE_JUDGE)
std::string Ask(int,int);
#endif
#define cir(i,a,b) for(int i=a;i<b;++i)
using namespace std;
#if not defined(__GRADER_H) && defined(ONLINE_JUDGE)
#define __GRADER_H 1
extern void findTreasure();
string Ask(int x,int y){
cerr<<"Ask:"<<x<<' '<<y<<“ Result=";
cout<<x<<' '<<y<<'\n';
cout.flush();
string res;
cin>>res;
cerr<<res<<'\n';
if(find(res.begin(),res.end(),'!')!=res.end()) exit(0);
return res;
}
int main(){
ios::sync_with_stdio(false),cin.tie(0);
findTreasure();
return 0;
}
#endif
static constexpr auto maxrng=(int)(1e6);
void findTreasure(){
Ask(0,0);
const auto strlf=Ask(1,1);
Ask(maxrng,maxrng);
const auto strrg=Ask(maxrng-1,maxrng-1);
if(strlf!=strrg){
cir(dxi,0,2) cir(dyi,0,2){
Ask(dxi,dyi);
Ask(maxrng-dxi,maxrng-dyi);
}
// abort();
}
const auto closer=strlf;
cerr<<"CLOSER="<<closer<<'\n';
auto xl=0,xr=maxrng,yl=0,yr=maxrng;
cir(i,0,20){
if(xl==xr&&yl==yr) break;
const auto xmid=midpoint(xl,xr);
const auto ymid=midpoint(yl,yr);
Ask(xmid,ymid);
Ask(xmid+1,ymid)==closer?xl=xmid+1:xr=xmid-1;
Ask(xmid+1,ymid+1)==closer?yl=ymid+1:yr=ymid-1;
}
Ask(xl,yl);
Ask(xl,yl+1);
Ask(xl+1,yl);
Ask(xl+1,yl+1);
// abort();
}