#include <bits/stdc++.h>
using namespace std;
int n, u, v, k, root, depth;
vector<int> path;
string s;
bool ask(int a, int b, int c) {
  cout << "? " << a << " " << b << " " << c << endl;
  cin >> s;
  return (s == "Yes");
}
void find_depth() {
  int e = 1;
  for (int i = 1; i < 20; i++) {
    e = e * k;
    if (e > n) {
      depth = i;
      return;
    }
  }
}
void Get_dist() {
  for (int i = 1; i < n + 1; i++)
    if (i != u && i != v && ask(u, i, v)) path.push_back(i);
}
bool check(int x) {
  int s = 0;
  for (int i = 0; i < path.size(); i++) s += ask(x, path[i], u);
  if (s == depth - 1) return 1;
  return 0;
}
void solve() {
  for (int i = 0; i < path.size(); i++)
    if (check(path[i])) {
      cout << "! " << path[i] << endl;
      return;
    }
}
void mv() {
  for (int q = 0; q < 55; q++) {
    u = rand() % n + 1, v = rand() % n + 1;
    while (v == u) v = rand() % n + 1;
    path.clear(), Get_dist();
    if (path.size() == depth * 2 - 3) {
      solve();
      return;
    }
  }
}
int main() {
  srand(time(NULL));
  cin >> n >> k;
  find_depth();
  mv();
}
