#include <bits/stdc++.h>
using namespace std;
inline int rnd(int U) { return (double)rand() / RAND_MAX * U + 1; }
pair<int, int> a, b;
int n, s, x;
void brute_force(int pos) {
  int v = -1;
  while (v < x && pos > 0) {
    printf("? %d\n", pos), fflush(stdout);
    scanf("%d%d", &v, &pos);
  }
  printf("! %d\n", v >= x ? v : -1), fflush(stdout);
}
int main() {
  srand(time(0));
  scanf("%d%d%d", &n, &s, &x);
  a = make_pair(-1, s);
  for (int i = 0; i < 999; i++) {
    printf("? %d\n", rnd(n)), fflush(stdout);
    scanf("%d%d", &b.first, &b.second);
    if (b.first == x)
      return printf("! %d\n", b.first), fflush(stdout), 0;
    else if (b.first < x && b.first > a.first)
      a = b;
  }
  brute_force(a.second);
  return 0;
}
