#include <bits/stdc++.h>
using namespace std;
int ask(int a, int b, int c) {
  cout << "? " << a << " " << b << " " << c << endl;
  cout.flush();
  string res;
  cin >> res;
  return res == "Yes";
}
int n, k;
int gofar(int u, int v) {
  for (int w = 1; w <= n; w++)
    if (w != u and w != v and ask(u, v, w)) v = w;
  return v;
}
int numbetween(int u, int v) {
  int num = 0;
  for (int w = 1; w <= n; w++) num += w != u and w != v and ask(u, w, v);
  return num;
}
void locate(int u, vector<int> &lis) {
  for (int i = 0; i < int(lis.size()); i++)
    if (lis[i] == u) return;
  if (not ask(lis[0], u, lis.back())) return;
  for (int i = 0; i < int(lis.size()) - 1; i++) {
    if (ask(lis[i], u, lis[i + 1])) {
      lis.push_back(u);
      for (int j = int(lis.size()) - 1; i + 1 < j; j--)
        swap(lis[j - 1], lis[j]);
      return;
    }
  }
}
int vertices[10000];
int main() {
  cin >> n >> k;
  int h = 0;
  int size = 1;
  for (int prod = k; size < n; prod *= k) {
    h++;
    size += prod;
  }
  for (int u = 1; u <= n; u++) vertices[u] = u;
  random_shuffle(vertices + 1, vertices + (n + 1));
  int ini = gofar(1, 2);
  int end;
  for (int i = 1; i <= n; i++) {
    end = vertices[i];
    if (ini == end) continue;
    end = gofar(ini, end);
    if (numbetween(ini, end) == h + h - 1) break;
  }
  vector<int> lis;
  lis.push_back(ini);
  lis.push_back(end);
  for (int u = 1; u <= n; u++) locate(u, lis);
  cout << "! " << lis[int(lis.size()) / 2] << endl;
  cout.flush();
}
