#include<bits/stdc++.h>
#define endl "\n"
#define FASTIO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
typedef long long int ll;
const int INF = 1e9;

using namespace std;

ll findHigh(ll target, ll axis, bool is_x, bool &center_found)
{
    ll lo = target;
    ll hi = (ll)1e9;
    while(!center_found and lo < hi)
    {
        ll mid = lo + (hi - lo + 1)/(ll)2;
        if(is_x) cout<<mid<<" "<<axis<<endl;
        else cout<<axis<<" "<<mid<<endl;

        //cout<<flush;
        string s;
        cin>>s;
        if(s=="CENTER")
        {
            center_found=true;
            break;
        }
        else if(s=="HIT")
        {
            lo = mid;
        }
        else
        {
            hi = mid - 1;
        }
        
    }

    return lo;
}

ll findLow(ll target, ll axis, bool is_x, bool &center_found)
{
    ll hi = target;
    ll lo = (ll)-1e9;
    while(!center_found and lo < hi)
    {
        ll mid = lo + (hi - lo)/(ll)2;
        if(is_x) cout<<mid<<" "<<axis<<endl;
        else cout<<axis<<" "<<mid<<endl;

        //cout<<flush;
        string s;
        cin>>s;
        if(s=="CENTER")
        {
            center_found=true;
            break;
        }
        else if(s=="HIT")
        {
            hi = mid;
        }
        else
        {
            lo = mid + 1;
        }
        
    }

    return lo;
}

int main()
{
    FASTIO
    ll i, j, n, t, a, b;
    cin>>t>>a>>b;
    cout<<"Hello World"<<endl;
    for(int cno=1; cno<=t; cno++)
    {
        cout<<"In test no. "<<cno<<endl;
        bool is_center = false;
        string s = "MISS";
        ll x = -1e9;
        ll y = 1e9;
        //find first hit
        while(s=="MISS")
        {
            cout<<x<<" "<<y<<endl;
            //cout<<flush;
            cin>>s;

            if(s != "MISS") break;
            if(x < 1e9) x+=2e9/(ll)4;
            else x = -1e9;

            if(x == -1e9) y -= 2e9/(ll)4;
        }
        if(s == "CENTER")
        {
            is_center = true;
            continue;
        }
        else
        {

            while(!is_center)
            {
                ll ub_x = findHigh(x, y, true, is_center);
                ll lb_x = findLow(x, y, true, is_center);
                ll ub_y = findHigh(y, x, false, is_center);
                ll lb_y = findLow(y, x, false, is_center);
                ll ctr_x, ctr_y;
                if(is_center) continue;
                else
                {
                    ctr_x = (ub_x + lb_x)/2;
                    ctr_y = (ub_y + lb_y)/2;
                    cout<<ctr_x<<" "<<ctr_y<<endl;
                    //cout<<flush;
                    string verdict;
                    cin>>verdict;
                    if(verdict != "CENTER") return 0;
                }
                
            }
        }
        
    }
    return 0;
}