#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, start;
  long long x;
  cin >> n >> start >> x;
  --start;
  srand(time(0));
  int rand_points = min(1000, n);
  vector<int> pts(n);
  for (int i = 0; i < n; ++i) pts[i] = i;
  random_shuffle(pts.begin(), pts.end(), [](int n) { return rand() % n; });
  int cp = start;
  long long cp_val = -1;
  cout << "? " << start + 1 << endl;
  fflush(stdout);
  long long val;
  int next;
  --next;
  cin >> cp_val >> next;
  for (int i = 0; i < rand_points; ++i) {
    cout << "? " << pts[i] + 1 << endl;
    fflush(stdout);
    long long val;
    int next;
    cin >> val >> next;
    --next;
    if (val <= x && val > cp_val) {
      cp = pts[i];
      cp_val = val;
    }
  }
  while (true) {
    if (cp < 0) {
      cout << "! -1" << endl;
      return 0;
    }
    cout << "? " << cp + 1 << endl;
    fflush(stdout);
    long long val;
    int next;
    cin >> val >> next;
    --next;
    if (val >= x) {
      cout << "! " << val << endl;
      return 0;
    }
    cp = next;
  }
}
