#include <bits/stdc++.h>
using namespace std;
int n, now, x;
map<int, int> mp;
int main() {
  ios::sync_with_stdio(0);
  srand(time(0));
  cin >> n >> now >> x;
  cout << "? " << now << endl;
  int t, tt, ne;
  cin >> t >> tt;
  if (t >= x) {
    cout << "! " << t << endl;
    return 0;
  }
  now = t, ne = tt;
  for (int i = 1; i <= 1300; i++) {
    t = (long long)rand() * rand() % n + 1;
    cout << "? " << t << endl;
    int v, vv;
    cin >> v >> vv;
    if (v < x && v > now) {
      now = v;
      ne = vv;
    }
  }
  while (ne != -1) {
    cout << "? " << ne << endl;
    cin >> now >> ne;
    if (now >= x) {
      cout << "! " << now << endl;
      return 0;
    }
  }
  cout << "! -1" << endl;
  return 0;
}
