#include <bits/stdc++.h>
using namespace std;
int main() {
  srand(time(NULL));
  int n = 0, x = 0, s = 0;
  cin >> n >> s >> x;
  int res = 0, pos = s, cnt = 0;
  vector<int> a;
  for (int i = 1; i <= n; ++i) {
    a.push_back(i);
  }
  random_shuffle(a.begin(), a.end());
  for (int i = 0; i < min(n, 1000); ++i) {
    int val = 0, nxt = 0;
    cout << "? " << a[i] << endl;
    cout.flush();
    cin >> val >> nxt;
    ++cnt;
    if (res < val && val <= x) {
      res = val;
      pos = nxt;
    }
  }
  while (pos != -1 && res < x && cnt < 2000) {
    cout << "? " << pos << endl;
    cout.flush();
    cin >> res >> pos;
    ++cnt;
  }
  if (res < x) {
    cout << "! -1" << endl;
  } else {
    cout << "! " << res << endl;
  }
  cout.flush();
  return 0;
}
