#include <bits/stdc++.h>
using namespace std;
int main() {
  iostream::sync_with_stdio(false);
  int n;
  cin >> n;
  int l = 1, h = 1e9;
  cout << "0 1" << endl;
  string at0;
  cin >> at0;
  for (int i = 0; i < n - 1; i++) {
    cout << (l + h) / 2 << " 1" << endl;
    string color;
    cin >> color;
    if (color == at0)
      l = (l + h) / 2 + 1;
    else
      h = (l + h) / 2 - 1;
  }
  cout << l - 1 << " 0"
       << " " << l << " 2" << endl;
}
