#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int main() {
  int f = 1;
  int e = 1e9;
  cin >> n;
  cout << "1 1"
       << "\n";
  cin >> s;
  for (int i = 2; i <= n; i++) {
    int x = (f + e) / 2;
    cout << "1 " << x << "\n";
    string s1;
    cin >> s1;
    if (s1 == s)
      f = x;
    else
      e = x;
  }
  cout << "2 " << e << " 0 " << f;
  return 0;
}
