#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
long long max(long long a, long long b) {
  if (a > b) {
    return a;
  } else {
    return b;
  }
}
long long min(long long a, long long b) {
  if (a < b) {
    return a;
  } else {
    return b;
  }
}
long long rand_int(long long l, long long r) {
  static mt19937_64 gen(chrono::steady_clock::now().time_since_epoch().count());
  return uniform_int_distribution<long long>(l, r)(gen);
}
long long power(long long b, long long e) {
  if (e == 0) return 1;
  if (e % 2)
    return ((b * power((b) * (b), (e - 1) / 2)));
  else
    return power((b) * (b), e / 2);
}
long long modpower(long long b, long long e, long long q) {
  long long MOD = q;
  if (e == 0) return 1;
  if (e % 2)
    return ((b % MOD) * modpower((b % MOD) * (b % MOD), (e - 1) / 2, q)) % MOD;
  else
    return modpower((b % MOD) * (b % MOD), e / 2, q) % MOD;
}
void dpv(vector<long long> v) {
  for (long long i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  cout << endl;
}
void dpv(vector<pair<long long, long long> > v) {
  for (long long i = 0; i < v.size(); i++) {
    cout << v[i].first << " " << v[i].second << endl;
  }
}
void dpv(set<long long> v) {
  for (auto i : v) {
    cout << i << " ";
  }
  cout << endl;
}
const long long M = 5 * 1e4 + 5;
long long val[M];
long long id[M];
void query(long long i) {
  if (val[i] != -1) {
    return;
  }
  cout << "? " << i + 1 << endl;
  cin >> val[i] >> id[i];
  if (id[i] != -1) {
    id[i]--;
  }
}
void answer(long long i) {
  if (i != -1) {
    i = val[i];
  }
  cout << "! " << i << endl;
  exit(0);
}
void oblivious() {
  long long n, start, x;
  cin >> n >> start >> x;
  start--;
  long long r = start;
  memset(val, -1, sizeof(val));
  memset(id, -1, sizeof(id));
  for (long long i = 0; i < 1000; i++) {
    long long x1 = rand_int(0, n - 1);
    query(x1);
    if (val[r] < val[x1] && val[x1] <= x) {
      r = x1;
    }
  }
  while (r != -1) {
    query(r);
    if (val[r] >= x) {
      answer(r);
    }
    r = id[r];
  }
  answer(-1);
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    oblivious();
  }
  return 0;
}
