#include <bits/stdc++.h>
using namespace std;
const int maxn = 50050;
pair<int, int> now;
int val[maxn], nxt[maxn], pos[maxn];
int n, st, k;
inline pair<int, int> que(const int& x) {
  printf("? %d\n", x), fflush(stdout);
  pair<int, int> now;
  scanf("%d%d", &now.first, &now.second);
  return now;
}
inline void pri(const int& x) {
  printf("! %d\n", x), fflush(stdout);
  exit(0);
}
int main() {
  srand(unsigned((long long)new char));
  scanf("%d%d%d", &n, &st, &k);
  now = que(st);
  pos[1] = st;
  val[1] = now.first;
  nxt[1] = now.second;
  if (now.first >= k) pri(now.first);
  for (int i = 2; i <= 1000; i++) {
    int tmp = (rand() * (rand() + rand()) % n * rand()) % n + 1;
    pos[i] = tmp;
    now = que(tmp);
    val[i] = now.first;
    nxt[i] = now.second;
  }
  int maxindex = 1;
  for (int i = 2; i <= 1000; i++)
    if (val[i] > val[maxindex] && val[i] < k) maxindex = i;
  int nowpos = pos[maxindex], nextpos = nxt[maxindex], value = val[maxindex];
  while (value < k) {
    if (nextpos == -1) pri(-1);
    nowpos = nextpos;
    now = que(nowpos);
    value = now.first;
    nextpos = now.second;
  }
  pri(value);
  return 0;
}
