#include <bits/stdc++.h>
using namespace std;
vector<int> vec;
void prnt(int x) {
  printf("! %d\n", x);
  fflush(stdout);
  return;
}
int main() {
  int n, i, j, k, p, q, x, y, st, val, ne;
  scanf("%d %d %d", &n, &st, &x);
  for (i = 0; i < n; i++) vec.push_back(i + 1);
  random_shuffle(vec.begin(), vec.end());
  random_shuffle(vec.begin(), vec.end());
  printf("? %d\n", st);
  fflush(stdout);
  scanf("%d %d", &val, &ne);
  if (val >= x) {
    prnt(val);
    return 0;
  }
  y = val;
  for (i = 0; i < min(1050, n); i++) {
    printf("? %d\n", vec[i]);
    fflush(stdout);
    scanf("%d %d", &val, &ne);
    if (val < x && val > y) st = vec[i], y = val;
  }
  while (y < x) {
    printf("? %d\n", st);
    fflush(stdout);
    scanf("%d %d", &y, &ne);
    st = ne;
    if (st == -1) break;
  }
  if (y >= x)
    prnt(y);
  else
    prnt(-1);
  return 0;
}
