#include <bits/stdc++.h>
using namespace std;
char s[10], t[10];
int n, m, k, i, a[31];
void f(int w, int u, int v) {
  m = (u + v) / 2;
  cout << k - m << " " << m << endl;
  cin >> s;
  if (w < n) {
    if (s[0] == t[0])
      f(w + 1, u, m);
    else
      f(w + 1, m, v);
  } else {
    if (s[0] == t[0])
      cout << k - m + 1 << " " << m << " 1 0" << endl;
    else if (k - m != 1)
      cout << k - m << " " << m + 1 << " 1 0" << endl;
    else
      cout << "0 " << k << " 1 0" << endl;
    return;
  }
}
int main() {
  cin >> n;
  cout << "0 0" << endl;
  cin >> t;
  k = (1 << (n - 1));
  if (n == 1) {
    cout << "0 1 1 1" << endl;
    return 0;
  }
  f(2, 0, k);
  return 0;
}
