#include <bits/stdc++.h>
using namespace std;
using ll = long long;
bool interactor(int a, int b) {
  cout << a << " " << b << endl;
  fflush(stdout);
  string s;
  cin >> s;
  return s[0] == 'b';
}
int main() {
  int n;
  cin >> n;
  int low = 1;
  int high = 1000000000;
  int t = interactor(1, 0);
  for (int i = 1; i < n; i++) {
    int mid = (low + high) / 2;
    if (interactor(1, mid) == t)
      low = mid;
    else
      high = mid;
  }
  cout << 0 << " " << low << " " << 2 << " " << low + 1 << endl;
  return 0;
}
