#include <bits/stdc++.h>
using namespace std;
struct reply {
  int index;
  int value;
  int nexti;
};
bool operator<(reply a, reply b) { return a.value < b.value; }
void getValue(int i, reply &r) {
  ostringstream oss;
  oss << "? " << i << endl;
  cout << oss.str();
  fflush(stdout);
  r.index = i;
  cin >> r.value >> r.nexti;
}
int main(int argc, const char *argv[]) {
  int n, start, x;
  cin >> n >> start >> x;
  vector<int> vi;
  for (int i = 1; i <= n; i++) vi.push_back(i);
  random_shuffle(vi.begin(), vi.end());
  random_shuffle(vi.begin(), vi.end());
  vector<int> vi2;
  int q = min((int)vi.size(), 300);
  for (int i = 0; i < q; i++) {
    vi2.push_back(vi[i]);
  }
  if (find(vi2.begin(), vi2.end(), start) == vi2.end()) vi2.push_back(start);
  vector<reply> vr;
  for (int i = 0; i < vi2.size(); i++) {
    ostringstream oss;
    reply r;
    getValue(vi2[i], r);
    vr.push_back(r);
  }
  sort(vr.begin(), vr.end());
  if (vr[0].value >= x) {
    cout << "! " << vr[0].value << endl;
    fflush(stdout);
    return 0;
  }
  int ind = start;
  for (int i = 0; i < vr.size(); i++) {
    if (vr[i].value < x) ind = i;
  }
  reply r = vr[ind];
  while (r.value < x && r.nexti != -1) {
    reply r2;
    getValue(r.nexti, r2);
    r = r2;
  }
  if (r.value < x) {
    cout << "! " << -1 << endl;
    fflush(stdout);
  } else {
    fflush(stdout);
    cout << "! " << r.value << endl;
    fflush(stdout);
  }
  return 0;
}
