#include <bits/stdc++.h>
using namespace std;
inline int mread() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
struct data {
  int nxt;
  int key;
} w[50010];
int n, start, x, tmp, tmpp, ans, vis[50010], cnt;
void ask(int po) {
  printf("? %d\n", po);
  fflush(stdout);
  tmp = mread(), tmpp = mread();
  vis[po] = 1;
  cnt++;
  w[po].nxt = tmpp;
  w[po].key = tmp;
}
int rand_k() {
  double k = (double)rand() / (double)RAND_MAX;
  int K = k * n;
  while (vis[K] || K == 0) {
    k = (double)rand() / (double)RAND_MAX;
    K = k * n;
  }
  return K;
}
int main() {
  n = mread(), start = mread(), x = mread();
  srand((unsigned int)time(0));
  int l, r = -1;
  ask(start);
  if (tmp >= x) {
    printf("! %d\n", tmp);
    fflush(stdout);
    return 0;
  }
  if (tmp < x && tmpp == -1) {
    printf("! -1\n");
    fflush(stdout);
    return 0;
  }
  l = start;
  cnt = 1;
  while (cnt <= 1999) {
    ask(w[l].nxt);
    if (tmp < x && tmpp == -1) {
      printf("! -1\n");
      fflush(stdout);
      return 0;
    }
    if (tmp < x && tmp > w[l].key)
      l = w[l].nxt;
    else if (tmp >= x) {
      printf("! %d\n", tmp);
      fflush(stdout);
      return 0;
    }
    int num = rand_k();
    ask(num);
    if (tmp < x && tmpp == -1) {
      printf("! -1\n");
      fflush(stdout);
      return 0;
    }
    if (tmp < x && tmp > w[l].key)
      l = num;
    else if (tmp >= x && (r == -1 || tmp < r))
      r = tmp;
  }
  printf("! %d\n", r);
  fflush(stdout);
  return 0;
}
