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