#include <bits/stdc++.h>
using namespace std;
int ask(int a, int b, int c) {
  cout << "? " << a << " " << b << " " << c << "\n";
  int rs;
  cin >> rs;
  return rs;
}
int main() {
  int n;
  cin >> n;
  int x = (1 << n) - 1;
  map<int, int> mp;
  mt19937 mt(48);
  for (int i = 0; i < 420; i++) {
    int a = (mt() % x);
    int b = (mt() % x);
    int c = (mt() % x);
    if (a == b || b == c || c == a) {
      i--;
      continue;
    }
    int v = ask(a + 1, b + 1, c + 1);
    mp[v]++;
  }
  vector<pair<int, int>> xx;
  for (auto it = mp.begin(); it != mp.end(); it++) {
    xx.push_back({it->second, it->first});
  }
  sort(xx.rbegin(), xx.rend());
  int a = xx[0].second;
  int b = xx[1].second;
  int c = a, rs = 0;
  for (int i = 1; i <= x; i++) {
    if (i != a && i != b) c = ask(a, b, i);
    if (c != a && c != b) rs = c;
    if (rs != 0) break;
  }
  cout << "! " << rs;
}
