#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
int main() {
  int l = 0, r = 1e9;
  int n;
  cin >> n;
  cout << "1 0" << endl;
  string lol;
  cin >> lol;
  char sym = lol[0];
  for (int i = 1; i < n; ++i) {
    int m = (l + r) >> 1;
    cout << "1 " << m << endl;
    string res;
    cin >> res;
    if (res[0] == sym)
      l = m;
    else
      r = m;
  }
  cout << "0 " << l << " 2 " << l + 1 << endl;
}
