#include <bits/stdc++.h>
using namespace std;
double A[100010];
struct Query {
  int i, v, n;
};
int main() {
  int N, S, X;
  cin >> N >> S >> X;
  srand(time(NULL));
  vector<int> V;
  for (int i = 0; i < N; ++i) {
    V.push_back(i);
  }
  int L = rand() % 20 + 1;
  for (int i = 0; i < L; ++i) {
    random_shuffle(V.begin(), V.end());
  }
  vector<int> ASKED(N);
  vector<Query> ANS;
  for (int i = 0; i < V.size() && ANS.size() < 1000; ++i) {
    int id = V[i];
    cout << "? " << id + 1 << endl;
    int v, n;
    cin >> v >> n;
    ANS.push_back({id, v, n == -1 ? -1 : (n - 1)});
  }
  sort(ANS.begin(), ANS.end(),
       [](const Query &a, const Query &b) { return a.v < b.v; });
  int ci = S - 1, AV = -1;
  for (int i = 0; i < ANS.size(); ++i) {
    if (ANS[i].v == X) {
      cout << "! " << ANS[i].v << endl;
      return 0;
    } else if (ANS[i].v < X) {
      ci = ANS[i].i;
      AV = ANS[i].v;
    }
  }
  if (ci == -1) {
    cout << "! " << -1 << endl;
    return 0;
  }
  for (int i = ANS.size(); i < 1999; ++i) {
    cout << "? " << ci + 1 << endl;
    int v, n;
    cin >> v >> n;
    if (v >= X) {
      cout << "! " << v << endl;
      return 0;
    }
    if (n == -1) {
      cout << "! -1" << endl;
      return 0;
    }
    ci = n - 1;
  }
  assert(false);
}
