#include <bits/stdc++.h>
using namespace std;
int n, p, l, r = 1e9;
string s, st;
int main() {
  scanf("%d", &n);
  printf("0 1\n");
  cin >> st;
  for (int i = 1; i < n; i++) {
    int mid = (l + r) / 2;
    printf("%d 1\n", mid);
    cin >> s;
    if (s == st)
      l = mid;
    else
      r = mid;
  }
  printf("%d 0 %d 2", l, r);
  return 0;
}
