#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
const int mod = 1e9 + 7;
bool u[N];
int get_next(vector<int>& v) {
  if (v.empty()) return -1;
  int ret = v.back();
  v.pop_back();
  return ret;
}
void query(int i, int& value, int& next) {
  printf("? %d\n", i);
  fflush(stdout);
  scanf("%d%d", &value, &next);
}
int main() {
  srand(time(0));
  int n, start, x;
  scanf("%d%d%d", &n, &start, &x);
  int idx = start;
  vector<int> v;
  for (int i = 0; i < n; ++i) v.push_back(i + 1);
  random_shuffle(v.begin(), v.end());
  int res = INT_MAX;
  int value_from = 0;
  int from = idx;
  int rand_cnt = 1000;
  for (int i = 0; i < rand_cnt; ++i) {
    int c = get_next(v);
    if (c == -1) break;
    int value, next;
    query(c, value, next);
    if (value < x && value > value_from) {
      value_from = value;
      from = c;
    }
    if (value >= x) {
      res = min(res, value);
    }
  }
  for (int i = 0; i < 2000 - rand_cnt; ++i) {
    int value, next;
    query(from, value, next);
    if (value >= x) res = min(res, value);
    if (value > x) break;
    if (next == -1) break;
    from = next;
  }
  if (res == INT_MAX) res = -1;
  printf("! %d\n", res);
  fflush(stdout);
  return 0;
}
