#include <bits/stdc++.h>
int n, k, a, b;
int ask(int x, int y) {
  if (x == n) return 1;
  fflush(stdout);
  printf("1 %d %d\n", x, y);
  fflush(stdout);
  char s[5];
  scanf("%s", s);
  fflush(stdout);
  return s[0] == 'T';
}
int xxx(int l, int r) {
  int mid, res = 0;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (ask(mid, mid + 1))
      res = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  return res;
}
int main() {
  scanf("%d%d", &n, &k);
  fflush(stdout);
  a = xxx(1, n);
  b = xxx(1, a - 1);
  if (!b) b = xxx(a + 1, n);
  fflush(stdout);
  printf("2 %d %d", a, b);
  fflush(stdout);
}
