#include <bits/stdc++.h>
using namespace std;
int main() {
  srand(time(NULL));
  long long n, start, x, i, j, k;
  scanf("%lld %lld %lld", &n, &start, &x);
  long long index = -1, maxi = 0;
  for (i = 0; i < min(n, 1000LL); i++) {
    long long curr = abs(((rand() << 15) + rand()) % n) + 1;
    printf("? %lld\n", curr);
    fflush(stdout);
    long long next, value;
    scanf("%lld %lld", &value, &next);
    if (value <= x and value > maxi) {
      index = curr;
      maxi = value;
    }
  }
  if (index == -1) {
    index = start;
  }
  while (index != -1) {
    printf("? %lld\n", index);
    fflush(stdout);
    long long next, value;
    scanf("%lld %lld", &value, &next);
    if (value >= x) {
      printf("! %lld\n", value);
      fflush(stdout);
      return 0;
    }
    index = next;
  }
  printf("! -1\n");
  fflush(stdout);
  return 0;
}
