#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
mt19937_64 gen(13875);
int main() {
  int n, st, x;
  srand(135);
  scanf("%d %d %d", &n, &st, &x);
  std::vector<int> used(n + 1, 0);
  used[st] = 1;
  printf("? %d\n", st);
  fflush(stdout);
  int val, nx;
  scanf("%d %d", &val, &nx);
  if (val >= x) {
    printf("! %d\n", val);
    fflush(stdout);
    return 0;
  }
  int best = val;
  int nxind = nx;
  std::vector<int> left;
  for (int i = 1; i < n + 1; i++)
    if (i != st) left.push_back(i);
  for (int i = 0; i < 950; i++) {
    if (left.empty()) break;
    int k = left.size();
    int ind = gen() % k;
    int cur = left[ind];
    swap(left[ind], left[k - 1]);
    left.pop_back();
    printf("? %d\n", cur);
    fflush(stdout);
    scanf("%d %d", &val, &nx);
    if (val < x && val > best) {
      best = val;
      ind = cur;
      nxind = nx;
    }
  }
  int cur = best;
  for (int i = 0; i < 1000; i++) {
    if (nxind == -1) {
      printf("! -1\n");
      fflush(stdout);
      return 0;
    }
    printf("? %d\n", nxind);
    fflush(stdout);
    scanf("%d %d", &val, &nx);
    if (val >= x) {
      printf("! %d\n", val);
      fflush(stdout);
      return 0;
    }
    nxind = nx;
  }
}
