#include <bits/stdc++.h>
using namespace std;
int main() {
  srand(time(0));
  int n, start, x;
  cin >> n >> start >> x;
  vector<int> v(n);
  for (int i = 0; i < n; ++i) v[i] = i;
  random_shuffle(v.begin(), v.end());
  v[0] = start - 1;
  vector<pair<int, int> > all;
  for (int i = 0; i < min(n, 1700); ++i) {
    cout << "? " << v[i] + 1 << endl;
    fflush(stdout);
    int curx, curnext;
    cin >> curx >> curnext;
    all.push_back(make_pair(curx, curnext));
  }
  sort(all.begin(), all.end());
  if (x <= all[0].first) {
    cout << "! " << all[0].first << endl;
    fflush(stdout);
    return 0;
  }
  for (int i = 0; i < all.size(); ++i) {
    if (i == all.size() - 1 || (all[i].first < x && all[i + 1].first >= x)) {
      int cur = all[i].second;
      while (true) {
        if (cur == -1) {
          cout << "! " << -1 << endl;
          fflush(stdout);
          return 0;
        }
        cout << "? " << cur << endl;
        fflush(stdout);
        int curx, curnext;
        cin >> curx >> curnext;
        if (curx >= x) {
          cout << "! " << curx << endl;
          fflush(stdout);
          return 0;
        }
        cur = curnext;
      }
    }
  }
}
