#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool rd(T &num) {
  char in;
  bool IsN = false;
  while (in = getchar(), in != '-' && (in < '0' || in > '9'))
    if (in == EOF) return false;
  in == '-' ? (IsN = true, num = 0) : num = in - '0';
  while (in = getchar(), in >= '0' && in <= '9') num = num * 10 + in - '0';
  return IsN ? num = -num : num, true;
}
template <class T, class S>
inline bool rd(T &num1, S &num2) {
  return rd(num1) && rd(num2);
}
template <class T, class S, class Z>
inline bool rd(T &num1, S &num2, Z &num3) {
  return rd(num1) && rd(num2) && rd(num3);
}
template <class T>
inline void _wr(T num) {
  if (num > 9) _wr(num / 10);
  putchar('0' + num % 10);
}
template <class T>
inline void wt(T num) {
  if (num < 0) putchar('-'), num = -num;
  _wr(num);
}
string nico;
const int maxn = 2000 + 7;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const int none = -1;
const long long linf = (long long)inf << 32 | inf;
string scolor, ncolor;
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  cout << "0 1" << '\n';
  cin >> scolor;
  long long l = 1, r = 1e9, mx = 0;
  for (register int(i) = (1); (i) < (n); ++(i)) {
    long long mid = (l + r) >> 1;
    cout << mid << " 1" << '\n';
    cin >> ncolor;
    if (ncolor == scolor)
      l = mid;
    else
      r = mid;
  }
  cout << r - 1 << " 2 " << r << " 0" << '\n';
}
