#include <bits/stdc++.h>
using namespace std;
inline int readc() {
  char c[5];
  cin >> c;
  return c[0] == 'T';
}
int ask(int x, int y) {
  cout << "1 " << x << " " << y << endl;
  return readc();
}
int solve(int l, int r) {
  while (l < r) {
    int mid = l + r >> 1;
    if (ask(mid, mid + 1))
      r = mid;
    else
      l = mid + 1;
  }
  return l;
}
int n, k;
signed main() {
  cin >> n >> k;
  int ans1 = solve(1, n), ans2;
  ans2 = solve(1, ans1 - 1);
  if (ans2 == ans1 || !ask(ans2, ans1)) ans2 = solve(ans1 + 1, n);
  cout << "2 " << ans1 << " " << ans2 << endl;
  return 0;
}
