#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  cin >> n;
  cout << 0 << " " << 1 << endl;
  fflush(stdout);
  string start, finish;
  cin >> start;
  finish = start;
  int l = 0, dis = 1 << 28;
  for (int i = 2; i <= n; ++i) {
    if (start == finish)
      l += dis;
    else
      l -= dis;
    cout << l << " " << 1 << endl;
    fflush(stdout);
    cin >> finish;
    dis /= 2;
  }
  if (start == finish)
    cout << l << " " << 2 << " " << l + 1 << " " << 0 << endl;
  else
    cout << l << " " << 2 << " " << l - 1 << " " << 0 << endl;
  return 0;
}
