#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
const int N = 2000 + 7;
const long long MX = 1e9;
const long double eps = (long double)5e-9;
const long double pi = acos(-1);
int main() {
  int n;
  char col[10];
  cin >> n;
  int L = 0, R = 1e9;
  cout << "1 " << L << endl;
  cin >> col;
  char st = col[0];
  for (int i = 2; i <= n; ++i) {
    int mid = (L + R) >> 1;
    cout << "1 " << mid << endl;
    cin >> col;
    if (st == col[0])
      L = mid;
    else
      R = mid;
  }
  cout << "0 " << L << " 2 " << R << endl;
}
