#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  int lo = 0;
  int hi = 1e9;
  int f = 0;
  cout << "1 0" << endl;
  string s;
  cin >> s;
  string l = s;
  if (n == 1) {
    cout << "0 2 2 2" << endl;
  } else {
    for (int i = 1; i < n; i++) {
      int mid = (lo + hi) / 2;
      cout << "1 " << mid << endl;
      cin >> s;
      if (s != l) {
        hi = mid;
      } else
        lo = mid;
    }
    cout << "0 " << lo << " 2 " << hi << endl;
  }
  return 0;
}
