#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const double eps = 1e-6;
inline long long pow(long long a, long long b, long long p) {
  long long rtn = 1;
  while (b) {
    if (b & 1) rtn = rtn * a % p;
    a = a * a % p;
    b >>= 1;
  }
  return rtn;
}
long long inv(long long a, long long p) { return pow(a, p - 2, p); }
long long gcd(long long a, long long b) {
  long long k;
  while (b != 0) {
    k = b;
    b = a % b;
    a = k;
  }
  return a;
}
void makedata() {
  freopen("input.txt", "w", stdout);
  srand((unsigned)time(NULL));
  fclose(stdout);
}
string col, s;
int main() {
  std::ios::sync_with_stdio(0), cin.tie(0);
  int n;
  cin >> n;
  int l = 0, r = 1000000000, mid;
  cout << l << " 1" << endl;
  cin >> col;
  for (int i = (2); i <= (n); i++) {
    mid = (l + r) / 2;
    cout << mid << " 1" << endl;
    cin >> s;
    if (col == s)
      l = mid;
    else
      r = mid;
  }
  cout << l << " 2 " << r << " 0" << endl;
  return 0;
}
