#include <bits/stdc++.h>
using namespace std;
int n, st, x, tmp, pos;
int ans = -1;
int rad[100010];
int main() {
  scanf("%d%d%d", &n, &st, &x);
  int cnt = min(n, 999);
  for (int i = 0; i < n; i++) rad[i] = i + 1;
  for (int i = 1; i <= 100; i++) random_shuffle(rad, rad + n);
  for (int i = 0; i < cnt; i++) {
    printf("? %d\n", rad[i]);
    fflush(stdout);
    scanf("%d %d", &tmp, &pos);
    if (tmp <= x && ans < tmp) {
      ans = tmp, st = pos;
    }
  }
  while (st != -1 && ans < x) {
    printf("? %d\n", st);
    fflush(stdout);
    scanf("%d%d", &tmp, &pos);
    ans = tmp, st = pos;
  }
  if (ans < x)
    printf("! -1\n");
  else
    printf("! %d\n", ans);
  fflush(stdout);
  return 0;
}
