#include <bits/stdc++.h>
using namespace std;
int n;
string c, clr;
int main() {
  cin >> n;
  n--;
  cout << 0 << " " << 0 << endl;
  cin >> clr;
  int l = 0, r = 1e9 + 1;
  for (int i = 0; i < n; i++) {
    int mid = (l + r) / 2;
    cout << mid << " " << mid << endl;
    cin >> c;
    if (c == clr)
      l = mid;
    else
      r = mid;
  }
  cout << l << " " << l + 1 << " " << l + 1 << " " << l;
}
