#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long l = 1, r = 1e9;
  cout << 0 << " " << 1 << endl;
  string us, state;
  cin >> state;
  us = state;
  long long m = (l + r) / 2;
  for (long long i = 1; i < n; i++) {
    m = (l + r) / 2;
    cout << m << " " << 1 << endl;
    cin >> state;
    if (state[0] == us[0]) {
      l = m;
    } else {
      r = m;
    }
  }
  if (state[0] == us[0]) {
    cout << m << " " << 2 << " " << m + 1 << " " << 0 << endl;
  } else {
    cout << m << " " << 2 << " " << m - 1 << " " << 0 << endl;
  }
  return 0;
}
