#include <bits/stdc++.h>
using namespace std;
long long i, j, mx, x, n, m, p, k, nx, a, b, d[100009];
int main() {
  srand(time(0));
  cin >> n >> p >> x;
  cout << "? " << p << endl;
  fflush(stdout);
  cin >> mx >> nx;
  d[p] = 1;
  m = min(1000LL, n - 1);
  for (i = 1; i <= m; i++) {
    while (1) {
      k = (((rand() % n) + (rand() % n)) % n) + 1;
      if (!d[k]) break;
    }
    d[k] = 1;
    cout << "? " << k << endl;
    fflush(stdout);
    cin >> a >> b;
    if (a > mx && a < x) mx = a, nx = b;
  }
  while (nx != -1 && mx < x) {
    if (++j > 997) break;
    cout << "? " << nx << endl;
    fflush(stdout);
    cin >> mx >> nx;
  }
  if (mx < x)
    cout << "! " << -1;
  else
    cout << "! " << mx;
}
