#include <bits/stdc++.h>
using namespace std;
bool cmp_pair_F_2(pair<int, int> x, pair<int, int> y) {
  return x.first > y.first;
}
bool cmp_pair_S_2(pair<int, int> x, pair<int, int> y) {
  return x.second > y.second;
}
bool cmp_pair_S_1(pair<int, int> x, pair<int, int> y) {
  return x.second < y.second;
}
bool cmp(int x, int y) { return x > y; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  srand(time(0));
  int n, s, x;
  cin >> n >> s >> x;
  int a[n];
  iota(a, a + n, 1);
  random_shuffle(a, a + n);
  int val = -1, t = s;
  int v;
  for (int i = 0; i < min(n, 1000); i++) {
    int rnd = a[i];
    {
      cout << "? " << rnd << endl;
      int nxt;
      cin >> v >> nxt;
      if (v > val && v <= x) val = v, t = nxt;
    }
  }
  if (n == 1) {
    if (val >= x || v >= x)
      return cout << "! " << v << endl, 0;
    else
      return cout << "! " << -1 << endl, 0;
  }
  if (val >= x) return cout << "! " << val << endl, 0;
  while (t != -1) {
    cout << "? " << t << endl;
    cin >> val >> t;
    if (val >= x) return cout << "! " << val << endl, 0;
  }
  return cout << "! " << -1 << endl, 0;
  return 0;
}
