#include <bits/stdc++.h>
using namespace std;
inline int rit() {
  int f = 0, key = 1;
  char ch;
  do {
    ch = getchar();
    if (ch == '-') key = -1;
  } while (ch < '0' || ch > '9');
  do {
    f = f * 10 + ch - '0';
    ch = getchar();
  } while (ch >= '0' && ch <= '9');
  return f * key;
}
int qcnt, n, st, x, ans;
int sv_pl;
pair<int, int> re;
bool hv_q[50000 + 5];
int32_t main(void) {
  mt19937 mt_rand(time(NULL));
  n = rit(), st = rit(), x = rit();
  ans = -1;
  while (qcnt < 877 + 4 && qcnt < n) {
    int i = mt_rand() % n + 1;
    if (hv_q[i]) {
      continue;
    }
    qcnt++;
    printf("? %d\n", i);
    fflush(stdout);
    scanf("%d%d", &re.first, &re.second);
    if (re.first > ans && re.first < x) ans = re.first, sv_pl = i;
  }
  sv_pl = sv_pl ? sv_pl : st;
  while (ans < x && qcnt < 1999) {
    printf("? %d\n", sv_pl);
    fflush(stdout);
    scanf("%d%d", &re.first, &re.second);
    sv_pl = re.second < 0 ? sv_pl : re.second;
    ans = re.first;
    qcnt++;
  }
  if (ans < x) ans = -1;
  printf("! %d\n", ans);
  fflush(stdout);
  return 0;
}
