#include <bits/stdc++.h>
using namespace std;
int n;
map<int, string> mp;
map<string, int> cnt1, cnt2;
string write(int x) {
  cout << x << ' ' << 0 << '\n';
  fflush(stdout);
  string s;
  cin >> s;
  return s;
}
int main() {
  cin.sync_with_stdio(false);
  srand(10);
  cin >> n;
  string W = write(1);
  int st = 2, dr = 1e9 - 3, mid, i;
  for (i = 1; i < n; ++i) {
    mid = (st + dr) / 2;
    if (write(mid) == W)
      st = mid + 1;
    else
      dr = mid - 1;
  }
  cout << st << ' ' << 1 << ' ' << st + 1 << ' ' << 3 << '\n';
  fflush(stdout);
  return 0;
}
