#include <bits/stdc++.h>
using namespace std;
int n;
int l = 0, r = 1e9;
char ans[6];
map<int, int> color;
int main() {
  scanf("%d", &n);
  printf("%d %d\n", 0, 1);
  fflush(stdout);
  for (int i = 0; i < 5; i++) {
    cin >> ans[i];
  }
  if (ans[0] == 'b') {
    color[0] = 1;
    color[r] = 2;
  } else {
    color[0] = 2;
    color[r] = 1;
  }
  for (int i = 2; i <= n; i++) {
    int mid = (l + r) >> 1;
    printf("%d %d\n", mid, 1);
    fflush(stdout);
    for (int j = 0; j < 5; j++) {
      cin >> ans[j];
    }
    if (ans[0] == 'b') {
      color[mid] = 1;
    } else {
      color[mid] = 2;
    }
    if (color[l] == color[mid]) {
      l = mid;
    } else {
      r = mid;
    }
  }
  printf("%d %d %d %d\n", l, 2, r, 0);
  return 0;
}
