#include <bits/stdc++.h>
using namespace std;
uniform_int_distribution<long long> d(156, 99657);
mt19937 rnd;
int n, s, x, mn = -100, q, w;
void solve() {
  scanf("%d%d%d", &n, &s, &x);
  if (n >= 2000) {
    for (int i = 1; i <= 1000; i++) {
      printf("? %d\n", (d(rnd) * d(rnd)) % n + 1);
      fflush(stdout);
      scanf("%d%d", &q, &w);
      if (q < x && q > mn) {
        mn = q;
        s = w;
      }
    }
  }
  while (1) {
    printf("? %d\n", s);
    fflush(stdout);
    scanf("%d%d", &q, &w);
    if (q >= x) {
      printf("! %d\n", q);
      fflush(stdout);
      return;
    }
    if (w == -1) {
      printf("! -1\n");
      fflush(stdout);
      return;
    }
    s = w;
  }
}
int main() {
  rnd.seed(time(NULL));
  int tt = 1;
  for (int i = 1; i <= tt; i++) solve();
}
