#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  int h;
  cin >> h;
  int n = (1 << h) - 1;
  vector<pair<int, int>> c(n + 1);
  for (int i = 0; i <= n; i++) c[i] = {0, i};
  for (int i = 0; i < 420; i++) {
    int u = rng() % n + 1, v = rng() % n + 1, w = rng() % n + 1;
    while (u == v) v = rng() % n + 1;
    while (w == u || w == v) w = rng() % n + 1;
    cout << "? " << u << " " << v << " " << w << "\n";
    int x;
    cin >> x;
    c[x].first++;
  }
  sort(c.rbegin(), c.rend());
  for (int i = 1; i <= n; i++) {
    if (i == c[0].second || i == c[1].second) continue;
    cout << "? " << c[0].second << " " << c[1].second << " " << i << "\n";
    int x;
    cin >> x;
    if (x == i) {
      cout << "! " << i << "\n";
      return 0;
    }
  }
}
