#include <bits/stdc++.h>
using namespace std;
int n, s, x, q[1000], cnt, v, nxt, mx;
int main() {
  scanf("%d%d%d", &n, &s, &x);
  for (int i = 0; i < 1000; ++i)
    q[i] = i * 1000000009LL % n * 1000000007 % n + 1;
  cnt = min(1000, n);
  for (int i = 0; i < cnt; ++i) {
    printf("? %d\n", q[i]);
    fflush(stdout);
    scanf("%d%d", &v, &nxt);
    if (v <= x && mx < v) mx = v, s = nxt;
  }
  while (~s && mx < x) {
    printf("? %d\n", s);
    fflush(stdout);
    scanf("%d%d", &v, &nxt);
    mx = v;
    s = nxt;
  }
  printf("! %d\n", mx < x ? -1 : mx);
  fflush(stdout);
  return 0;
}
