#include <bits/stdc++.h>
using namespace std;
int n;
const int M = 1000000009;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  cout << "10 0\n";
  cout << flush;
  int a = 0;
  int b = 1000000000;
  string pocz;
  cin >> pocz;
  for (int i = 0; i < n - 1; ++i) {
    int c = a + b;
    c /= 2;
    cout << "10 " << c << "\n";
    cout << flush;
    string s;
    cin >> s;
    if (s == pocz)
      a = c;
    else
      b = c;
  }
  cout << "9 " << a << " 11 " << b << "\n";
  cout << flush;
  return 0;
}
