#include <bits/stdc++.h>
using namespace std;
int ans, ansIndex, n, s, x, val, res = 2000000006;
int main() {
  scanf("%d%d%d", &n, &s, &x);
  int nxt = s, m = min(800, n);
  for (int i = 0; i < m; i++) {
    printf("? %d\n", (rand() * 107 + rand()) % n + 1);
    fflush(stdout);
    scanf("%d %d", &val, &nxt);
    if (val < x && val > ans) {
      ans = val;
      ansIndex = nxt;
    }
  }
  nxt = ansIndex == 0 ? s : ansIndex, val = -1;
  while (nxt != -1 && val < x) {
    printf("? %d\n", nxt);
    fflush(stdout);
    scanf("%d %d", &val, &nxt);
    if (val >= x) res = min(res, val);
  }
  printf("! %d\n", 2000000006 == res ? -1 : res);
  return 0;
}
