#include <bits/stdc++.h>
using namespace std;
template <class T, class S>
ostream& operator<<(ostream& os, const pair<T, S>& v) {
  return os << "(" << v.first << ", " << v.second << ")";
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "[";
  for (int i = int(0); i <= int((static_cast<int>((v).size())) - 1); ++i) {
    if (i) os << ", ";
    os << v[i];
  }
  return os << "]";
}
template <class T>
bool setmax(T& _a, T _b) {
  if (_a < _b) {
    _a = _b;
    return true;
  }
  return false;
}
template <class T>
bool setmin(T& _a, T _b) {
  if (_b < _a) {
    _a = _b;
    return true;
  }
  return false;
}
template <class T>
T gcd(T _a, T _b) {
  return _b == 0 ? _a : gcd(_b, _a % _b);
}
vector<int> read_vi(int n = -1) {
  if (n < 0) scanf("%d", &n);
  vector<int> a(n);
  for (int i = int(0); i <= int((n)-1); ++i) scanf("%d", &a[i]);
  return a;
}
vector<long long> read_vl(int n = -1) {
  if (n < 0) scanf("%d", &n);
  vector<long long> a(n);
  for (int i = int(0); i <= int((n)-1); ++i) scanf("%lld", &a[i]);
  return a;
}
vector<double> read_vd(int n = -1) {
  if (n < 0) scanf("%d", &n);
  vector<double> a(n);
  for (int i = int(0); i <= int((n)-1); ++i) scanf("%lf", &a[i]);
  return a;
}
vector<pair<int, int> > read_vpi(int n = -1) {
  if (n < 0) scanf("%d", &n);
  vector<pair<int, int> > a(n);
  for (int i = int(0); i <= int((n)-1); ++i)
    scanf("%d%d", &a[i].first, &a[i].second);
  return a;
}
vector<pair<long long, long long> > read_vpl(int n = -1) {
  if (n < 0) scanf("%d", &n);
  vector<pair<long long, long long> > a(n);
  for (int i = int(0); i <= int((n)-1); ++i)
    scanf("%lld%lld", &a[i].first, &a[i].second);
  return a;
}
vector<pair<double, double> > read_vpd(int n = -1) {
  if (n < 0) scanf("%d", &n);
  vector<pair<double, double> > a(n);
  for (int i = int(0); i <= int((n)-1); ++i)
    scanf("%lf%lf", &a[i].first, &a[i].second);
  return a;
}
inline long long powmod(long long a, long long b, long long m) {
  long long r = 1;
  for (; b > 0; b >>= 1, a = a * a % m) {
    if (b & 1) r = r * a % m;
  }
  return r;
}
bool better(int x, int y) {
  printf("1 %d %d\n", y, x);
  fflush(stdout);
  char s[9];
  scanf("%s", s);
  return s[0] == 'N';
}
int main() {
  int n;
  scanf("%d%*d", &n);
  int l, r;
  for (l = 1, r = n; l < r;) {
    int mid = (l + r) / 2;
    if (better(mid, mid + 1)) {
      r = mid;
    } else {
      l = mid + 1;
    }
  }
  int first = l;
  if (first < n) {
    for (l = first + 1, r = n; l < r;) {
      int mid = (l + r) / 2;
      if (better(mid, mid + 1)) {
        r = mid;
      } else {
        l = mid + 1;
      }
    }
    if (!better(first, l)) {
      printf("2 %d %d\n", first, l);
      fflush(stdout);
      return 0;
    }
  }
  if (first > 1) {
    for (l = 1, r = first - 1; l < r;) {
      int mid = (l + r) / 2;
      if (better(mid + 1, mid)) {
        l = mid + 1;
      } else {
        r = mid;
      }
    }
    if (!better(first, l)) {
      printf("2 %d %d\n", first, l);
      fflush(stdout);
      return 0;
    }
  }
  printf("NO SOLUTION\n");
  return 0;
}
