#include <bits/stdc++.h>
using namespace std;
int num[50015];
int main() {
  int n, st, x;
  scanf("%d%d%d", &n, &st, &x);
  srand((unsigned)time(0));
  int cnt = min(999, n);
  int v = -1, t = 0, ne = 0;
  for (int i = 0; i < cnt; ++i) {
    printf("? %d\n", abs((rand() << 15) + rand()) % n + 1);
    fflush(stdout);
    scanf("%d%d", &t, &ne);
    if (t <= x && t >= v) v = t, st = ne;
  }
  while (st != -1 && v < x) {
    printf("? %d\n", st);
    fflush(stdout);
    scanf("%d%d", &v, &st);
  }
  if (v < x)
    printf("! -1\n");
  else
    printf("! %d\n", v);
  fflush(stdout);
  return 0;
}
