#include <bits/stdc++.h>
using namespace std;
long double sqr(long double a) { return a * a; }
int main() {
  long long n, l = 0, r = 1e9;
  string ans, ch;
  cin >> n;
  cout << "1 1000000000"
       << "\n";
  cin >> ans;
  ch = ans;
  for (long long i = 1; i < n; ++i) {
    long long m = (l + r) / 2;
    cout << "1 " << m << "\n";
    cin >> ans;
    if (ans == ch) {
      r = m;
    } else {
      l = m;
    }
  }
  cout << "0 " << l << " 2 " << r << "\n";
  return 0;
}
