#include <bits/stdc++.h>
using namespace std;
char s[10];
int main() {
  int n;
  scanf("%d", &n);
  int lo = 0, hi = 1e9;
  printf("1 %d\n", hi);
  fflush(stdout);
  scanf("%s", s);
  char target = s[0];
  for (int i = 1; i < n; i++) {
    int mid = (lo + hi) / 2;
    if (mid == hi) cerr << "Wrong\n";
    printf("1 %d\n", mid);
    fflush(stdout);
    scanf("%s", s);
    if (s[0] == target) {
      hi = mid;
    } else {
      lo = mid;
    }
  }
  printf("0 %d 2 %d\n", lo, hi);
}
