#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1073741824")
#pragma warning(disable : 4996)
using namespace std;
int nt, val, INF = 1e9 + 100;
void ask(int i) {
  cout << "? " << i << endl;
  fflush(stdout);
  cin >> val >> nt;
}
set<int> ar;
int main() {
  int ans = INF;
  int n, st, x;
  scanf("%d%d%d", &n, &st, &x);
  for (int i = 0; i < n; i++) ar.insert(i + 1);
  int q = 1998, last = -1, a = -1;
  ask(st);
  if (val >= x) {
    cout << "! " << val << endl;
    fflush(stdout);
    return 0;
  } else {
    last = val;
    a = nt;
  }
  srand(time(0));
  while (q-- > 1000 && !ar.empty()) {
    long long int i = rand() * (long long int)rand() % ar.size();
    auto it = ar.begin();
    advance(it, i);
    ask(*it);
    if (val >= x)
      ans = min(ans, val);
    else if (val > last) {
      last = val;
      a = nt;
    }
    ar.erase(it);
    ar.erase(nt);
  }
  while (q-- && a != -1) {
    ask(a);
    a = nt;
    if (val >= x) ans = min(ans, val);
  }
  cout << "! " << (ans == INF ? -1 : ans) << endl;
  fflush(stdout);
  return 0;
}
