#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  srand(time(NULL));
  long long n, start, x;
  cin >> n >> start >> x;
  long long K = 1000;
  set<long long> used;
  long long max_value = -1000;
  long long next;
  for (long long i = 0; i < min(K, n - 1); i++) {
    long long q;
    while (true) {
      long long r = ((rand() * rand()) % n) + 1;
      if (!used.count(r)) {
        q = r;
        break;
      }
    }
    cout << "? " << q << endl;
    cout.flush();
    long long v, nn;
    cin >> v >> nn;
    if (v > max_value && v < x) {
      next = nn;
      max_value = v;
    }
  }
  cout << "? " << start << endl;
  cout.flush();
  long long v, nn;
  cin >> v >> nn;
  if (v > max_value && v < x) {
    next = nn;
  }
  if (v >= x) {
    cout << "! " << v << endl;
    cout.flush();
    return 0;
  }
  while (true) {
    if (next == -1) {
      cout << "! -1" << endl;
      cout.flush();
      return 0;
    }
    cout << "? " << next << endl;
    cout.flush();
    long long v, nn;
    cin >> v >> nn;
    if (v >= x) {
      cout << "! " << v << endl;
      cout.flush();
      return 0;
    }
    if (nn == -1) {
      cout << "! -1" << endl;
      cout.flush();
      return 0;
    }
    next = nn;
  }
  return 0;
}
