#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  cout << 0 << " " << 500 << endl;
  string p;
  cin >> p;
  int low = 0, high = 1e9;
  for (int i = 0; i < n - 1; i++) {
    int mid = (low + high) / 2;
    cout << mid << " " << 500 << endl;
    string s;
    cin >> s;
    if (s == p)
      low = mid;
    else
      high = mid;
  }
  cout << high << " " << 501 << " " << low << " " << 499 << endl;
}
