#include <bits/stdc++.h>
using namespace std;
int ask(int first) {
  printf("%d 1\n", first);
  fflush(stdout);
  char s[11];
  scanf("%s", s);
  return s[0] == 'b';
}
int main() {
  int n;
  cin >> n;
  int L = 0, R = 1 << n - 1;
  int f = ask(L);
  for (int i = 1; i < n; i++) {
    int mid = L + R >> 1;
    if (ask(mid) == f)
      L = mid;
    else
      R = mid;
  }
  printf("%d %d %d %d\n", L, 0, R, 2);
  fflush(stdout);
  return 0;
}
