#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool chkmin(T &x, T y) {
  return (y < x) ? (x = y, 1) : 0;
}
template <typename T>
inline bool chkmax(T &x, T y) {
  return (y > x) ? (x = y, 1) : 0;
}
inline int read() {
  int x;
  char c;
  int f = 1;
  while ((c = getchar()) != '-' && (c > '9' || c < '0'))
    ;
  if (c == '-') f = -1, c = getchar();
  x = c ^ '0';
  while ((c = getchar()) >= '0' && c <= '9')
    x = (x << 1) + (x << 3) + (c ^ '0');
  return x * f;
}
inline long long readll() {
  long long x;
  char c;
  int f = 1;
  while ((c = getchar()) != '-' && (c > '9' || c < '0'))
    ;
  if (c == '-') f = -1, c = getchar();
  x = c ^ '0';
  while ((c = getchar()) >= '0' && c <= '9')
    x = (x << 1ll) + (x << 3ll) + (c ^ '0');
  return x * f;
}
char s[100];
int gettype(int x, int y) {
  printf("%d %d\n", x, y);
  fflush(stdout);
  scanf("%s", s + 1);
  if (s[1] == 'w') return 0;
  return 1;
}
int main() {
  int L = 0, R = 1e9 - 1;
  int n = read();
  int ty = gettype(0, 1);
  if (n == 1) return printf("3 3 4 3"), cout << endl, 0;
  int Mid = (L + R) >> 1;
  for (register int i = 2, iend = n - 1; i <= iend; ++i) {
    Mid = (L + R) >> 1;
    int t = gettype(Mid, 1);
    if (t ^ ty)
      R = Mid;
    else
      L = Mid;
  }
  if (L == Mid) {
    int t = gettype(Mid, 2);
    if (t ^ ty)
      printf("%d 3 %d 0", Mid - 1, Mid + 1);
    else
      printf("%d 3 %d 0", Mid + 1, Mid);
  } else {
    int t = gettype(Mid, 2);
    if (t ^ ty)
      printf("%d 3 %d 0", Mid - 1, Mid);
    else
      printf("%d 3 %d 0", Mid + 1, Mid - 1);
  }
  cout << endl;
  return 0;
}
