#include <bits/stdc++.h>
using namespace std;
int NEX[50010];
int VAL[50010];
void init(int N) {
  for (int i = 1; i <= N; ++i) {
    VAL[i] = (i << 10) + rand() % 1024;
    NEX[i] = i + 1 > N ? -1 : i + 1;
  }
}
pair<int, int> ask(int n) {
  cout << "? " << n + 1 << endl;
  pair<int, int> r;
  if (!0) {
    cin >> r.first >> r.second;
  } else {
    r.first = VAL[n + 1];
    r.second = NEX[n + 1];
  }
  if (0) {
    cout << "\t" << r.first << " " << r.second << endl;
  }
  if (r.second != -1) r.second--;
  return r;
}
void done(int v) {
  cout << "! " << v << endl;
  exit(0);
}
int main() {
  srand(234334);
  int best = -1, act = -1;
  int N, S, X;
  cin >> N >> S >> X;
  S--;
  init(N);
  vector<int> V(N);
  for (int i = 0; i < V.size(); ++i) V[i] = i;
  swap(V[0], V[S]);
  random_shuffle(V.begin() + 1, V.end());
  if (ask(S).first >= X) {
    done(ask(S).first);
  }
  for (int i = 0; i < 1000 && i < V.size(); ++i) {
    int r = V[i];
    pair<int, int> e = ask(r);
    if (e.first < X) {
      if (best == -1 || act < e.first) {
        act = e.first;
        best = r;
      }
    }
  }
  while (best != -1) {
    pair<int, int> e = ask(best);
    if (e.first >= X) {
      done(e.first);
    }
    best = e.second;
  }
  done(-1);
}
