#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-9;
const int inf = (1 << 30) - 1;
const long long inf64 = ((long long)1 << 62) - 1;
const long double pi = acos(-1);
template <class T>
T sqr(T x) {
  return x * x;
}
template <class T>
T abs(T x) {
  return x < 0 ? -x : x;
}
int Rand(int n) { return (rand() * (long long)RAND_MAX + rand()) % n; }
pair<int, int> Ask(int pos) {
  cout << "? " << pos + 1 << "\n";
  fflush(stdout);
  int val, next;
  cin >> val >> next;
  if (val == -1 && next == -1) {
    exit(0);
  }
  if (next != -1) {
    --next;
  }
  return make_pair(val, next);
}
void Print(int val) {
  cout << "! " << val << "\n";
  fflush(stdout);
}
const int magic = 1000;
int main() {
  ios_base::sync_with_stdio(0);
  srand(296);
  int n, s, x;
  cin >> n >> s >> x;
  --s;
  int val_0 = Ask(s).first;
  if (val_0 >= x) {
    Print(val_0);
    return 0;
  }
  vector<pair<int, int>> a;
  a.push_back(make_pair(s, val_0));
  for (int i = 0; i < magic; ++i) {
    int pos = Rand(n);
    int val = Ask(pos).first;
    a.push_back(make_pair(pos, val));
  }
  int ind = 0;
  for (int i = 1; i < ((int)(a).size()); ++i) {
    if (a[i].second < x && a[i].second > a[ind].second) {
      ind = i;
    }
  }
  pair<int, int> ans = Ask(a[ind].first);
  while (ans.first < x) {
    if (ans.second == -1) {
      Print(-1);
      return 0;
    }
    ans = Ask(ans.second);
  }
  Print(ans.first);
  return 0;
}
