#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200000;
const int MOD = 1e9 + 7;
const int INF = 1e9 + 10;
const long long int LLINF = 1e18 + 10;
int N, S, X;
vector<pair<int, int>> els;
bool f[MAXN] = {false};
int v[MAXN];
int n[MAXN];
void check(int vi, int ni) {
  if (ni == -1 && vi == -1) {
    exit(0);
  }
}
int main() {
  scanf("%d%d%d", &N, &S, &X);
  int vi, ni;
  memset(n, -1, sizeof(n));
  memset(v, -1, sizeof(v));
  printf("? %d\n", S);
  f[S] = true;
  fflush(stdout);
  scanf("%d%d", &vi, &ni);
  check(vi, ni);
  v[S] = vi, n[S] = ni;
  els.push_back(make_pair(vi, ni));
  if (vi >= X) {
    printf("! %d\n", vi);
    fflush(stdout);
    return 0;
  }
  int sn = (sqrt(N) + 1) / 2;
  int pos = 1;
  while (pos <= N) {
    printf("? %d\n", pos);
    fflush(stdout);
    scanf("%d%d", &vi, &ni);
    check(vi, ni);
    v[pos] = vi, n[pos] = ni;
    els.push_back(make_pair(vi, ni));
    pos += rand() % sn + 1;
    if (pos == S) ++pos;
  }
  sort(els.begin(), els.end());
  int s =
      lower_bound(els.begin(), els.end(), make_pair(X, -2)) - els.begin() - 1;
  vi = els[s].first;
  ni = els[s].second;
  while (ni != -1) {
    if (v[ni] == -1) {
      printf("? %d\n", ni);
      fflush(stdout);
      scanf("%d%d", &vi, &ni);
      check(vi, ni);
    } else {
      vi = v[ni];
      ni = n[ni];
    }
    if (vi >= X) {
      printf("! %d\n", vi);
      fflush(stdout);
      return 0;
    }
  }
  puts("! -1");
  fflush(stdout);
  return 0;
}
