#include <bits/stdc++.h>
int n;
char o(int x, int y) {
  printf("%d %d\n", x, y);
  fflush(stdout);
  char s[111];
  scanf("%s", s);
  return s[0];
}
int main() {
  scanf("%d", &n);
  int l = 0, r = 1e9;
  char c = o(l, 1);
  for (int i = 2; i <= n; i++) {
    int mi = l + (r - l) / 2;
    char x = o(mi, 1);
    if (x == c)
      l = mi;
    else
      r = mi;
  }
  printf("%d 0 %d 2\n", l, r);
  fflush(stdout);
  return 0;
}
