#include <bits/stdc++.h>
using namespace std;
string st, t;
int n, cnt;
int main() {
  cin >> n;
  int s = 0, e = 1e9, m = 0;
  while (cnt < n) {
    cout << m << " " << 1 << '\n';
    cin >> st;
    if (cnt == 0) t = st;
    if (st == t)
      s = m;
    else
      e = m;
    m = (s + e) / 2;
    cnt++;
  }
  return cout << s << " " << 0 << " " << e << " " << 2, 0;
}
