#include <bits/stdc++.h>
using namespace std;
signed main() {
  srand(clock());
  long long n, start, x;
  cin >> n >> start >> x;
  long long arr[n + 1];
  for (long long i = 1; i < n + 1; i++) {
    arr[i] = i;
  }
  long long val;
  long long ind;
  long long cur = -1;
  long long stt = -1;
  random_shuffle(arr + 1, arr + n + 1);
  for (long long i = 1; i < 1000 && i <= n; i++) {
    cout << "? " << arr[i] << endl;
    fflush(stdout);
    cin >> val >> ind;
    if (val <= x && val > cur) {
      cur = val;
      stt = arr[i];
    }
  }
  if (stt == -1) {
    stt = start;
  }
  long long ans = -1;
  long long steps = 0;
  while (stt != -1 && steps < 999) {
    cout << "? " << stt << endl;
    fflush(stdout);
    cin >> val >> ind;
    if (val >= x) {
      ans = val;
      break;
    }
    stt = ind;
    steps++;
  }
  cout << "! " << ans << endl;
  fflush(stdout);
  return 0;
}
