#include <bits/stdc++.h>
using namespace std;
int n, m, x, st, v, bst, bst_p, nxt, ran[55555];
int main() {
  srand(time(0));
  scanf("%d", &n), scanf("%d", &st), scanf("%d", &m);
  for (int i = (0); i < (n); i++) ran[i] = i + 1;
  random_shuffle(ran, ran + n);
  printf("? %d\n", st);
  fflush(stdout);
  scanf("%d", &bst), scanf("%d", &nxt), bst_p = st;
  if (bst >= m) {
    printf("! %d\n", bst);
    fflush(stdout);
    return 0;
  }
  for (int i = (0); i < (600); i++) {
    x = ran[i % n];
    printf("? %d\n", x);
    fflush(stdout);
    scanf("%d", &v), scanf("%d", &nxt);
    if (v <= m && v > bst) {
      bst = v;
      bst_p = x;
    }
  }
  while (bst < m) {
    printf("? %d\n", bst_p);
    fflush(stdout);
    scanf("%d", &bst), scanf("%d", &bst_p);
    if (bst < m && bst_p == -1) {
      puts("! -1");
      fflush(stdout);
      return 0;
    }
  }
  printf("! %d\n", bst);
  fflush(stdout);
  return 0;
}
