#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
bool query(int x, int y) {
  printf("1 %d %d\n", x, y);
  fflush(stdout);
  char buf[4];
  scanf("%s", buf);
  return buf[0] == 'T';
}
int finda(int s, int e, int ans) {
  int a = s;
  while (e > s) {
    int mid = (s + e) / 2;
    if (query(mid, mid + 1) == 0)
      a = s = mid + 1;
    else
      a = e = mid;
  }
  if (query(a, ans)) return a;
  return -1;
}
int main() {
  int n, k, s, e;
  scanf("%d", &n);
  scanf("%d", &k);
  s = 1;
  e = n;
  int a1 = s;
  while (e > s) {
    int mid = (s + e) / 2;
    if (query(mid, mid + 1) == 0)
      a1 = s = mid + 1;
    else
      a1 = e = mid;
  }
  int a2 = -1;
  if (a1 > 1) a2 = finda(1, a1 - 1, a1);
  if (a2 == -1) a2 = finda(a1 + 1, n, a1);
  cout << "2 " << a1 << " " << a2 << '\n';
  return 0;
}
