#include <bits/stdc++.h>
using namespace std;
struct angka {
  int val;
  int idx;
};
struct angka node[100100];
bool visited[50500];
int acak[50500];
bool desc(struct angka a, struct angka b) { return a.val < b.val; }
int main() {
  srand(time(NULL));
  int n, start, val, i, j, k, x, y, ans, curr, cari;
  scanf("%d %d %d", &n, &start, &cari);
  for (i = 0; i < n; i++) {
    acak[i] = i + 1;
  }
  random_shuffle(acak, acak + n);
  int index;
  int cnt = 0;
  int kali = min(1000, n);
  for (i = 1; i < kali; i++) {
    val = acak[i - 1];
    visited[val] = 1;
    printf("? %d\n", val);
    fflush(stdout);
    scanf("%d %d", &curr, &val);
    node[cnt].val = curr;
    node[cnt].idx = val;
    cnt++;
  }
  if (visited[start] == 0) {
    printf("? %d\n", start);
    fflush(stdout);
    scanf("%d %d", &curr, &val);
    node[cnt].val = curr;
    node[cnt].idx = val;
    cnt++;
  } else {
    printf("? %d\n", acak[i - 1]);
    fflush(stdout);
    scanf("%d %d", &curr, &val);
    node[cnt].val = curr;
    node[cnt].idx = val;
    cnt++;
  }
  sort(node, node + cnt, desc);
  val = 0;
  int nilai;
  for (i = 0; i < cnt; i++) {
    if (node[i].val <= cari) {
      val = node[i].idx;
      nilai = node[i].val;
    } else {
      if (val == 0) {
        printf("! %d\n", node[i].val);
        fflush(stdout);
        return 0;
      }
      break;
    }
  }
  if (nilai == cari) {
    printf("! %d\n", cari);
    fflush(stdout);
    return 0;
  } else if (val == -1) {
    printf("! -1\n");
    fflush(stdout);
    return 0;
  }
  bool ada = 0;
  for (i = 1; i <= 999; i++) {
    printf("? %d\n", val);
    fflush(stdout);
    scanf("%d %d", &curr, &val);
    if (curr >= cari) {
      ada = 1;
      break;
    }
    if (val == -1) {
      break;
    }
  }
  if (ada == 1) {
    printf("! %d\n", curr);
  } else {
    printf("! -1\n");
  }
  fflush(stdout);
  return 0;
}
