#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
long long readll() {
  bool minus = false;
  long long result = 0;
  char ch;
  ch = getchar();
  while (true) {
    if (ch == '-') break;
    if (ch >= '0' && ch <= '9') break;
    ch = getchar();
  }
  if (ch == '-')
    minus = true;
  else
    result = ch - '0';
  while (true) {
    ch = getchar();
    if (ch < '0' || ch > '9') break;
    result = result * 10 + (ch - '0');
  }
  if (minus)
    return -result;
  else
    return result;
}
int readint() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const int MX = 2000 + 10;
int n;
int getRandom() {
  long long res = (rand() * 1LL * rand()) % n + 1;
  return (int)res;
}
pair<int, int> query(int ind) {
  int x, y;
  printf("? %d\n", ind);
  fflush(stdout);
  scanf("%d %d", &x, &y);
  return {x, y};
}
void solve(int ans) {
  printf("! %d\n", ans);
  fflush(stdout);
  exit(0);
}
int main() {
  srand(time(0) + 5);
  int x, start;
  scanf("%d %d %d", &n, &start, &x);
  int limit = 350;
  pair<int, int> pi = query(start);
  int val = pi.first, ind = start;
  if (val >= x) solve(val);
  for (int i = 0; i < (int)limit; i++) {
    int num = getRandom();
    pi = query(num);
    int temp = pi.first;
    if (temp < x && temp > val) {
      val = temp;
      ind = num;
    }
  }
  int cnt = 301;
  while (ind != -1) {
    pi = query(ind);
    int temp = pi.first;
    if (temp >= x) solve(temp);
    ind = pi.second;
    cnt++;
  }
  solve(-1);
  return 0;
}
