#include <bits/stdc++.h>
using namespace std;
long long n, m, i, j, res;
long long w, sum, x, y, l, r;
long long a[10];
long long b[10];
string s, s1;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n;
  cout << 0 << " " << 666 << endl;
  cout.flush();
  cin >> s1;
  l = 0;
  r = 1000000007 - 7;
  for (i = 2; i <= n; i++) {
    m = (l + r) / 2;
    cout << m << " " << 666 << endl;
    cout.flush();
    cin >> s;
    if (s == s1)
      l = m;
    else
      r = m;
  }
  m = (l + r) / 2;
  if (r - 1 == l)
    return cout << l << " " << 665 << " " << r << " " << 667 << endl, 0;
  else
    return cout << m << " " << 666 << " " << m << " " << 667 << endl, 0;
}
