#include <bits/stdc++.h>
using namespace std;
template <typename T>
void _R(T &x) {
  cin >> x;
}
template <typename T>
void _R(vector<T> &x) {
  for (auto it = x.begin(); it != x.end(); it++) {
    _R(*it);
  }
}
void R() {}
template <typename T, typename... K>
void R(T &head, K &...tail) {
  _R(head);
  R(tail...);
}
template <typename T>
void _W(const T &x, const char c) {
  cout << x;
}
template <typename T>
void _W(const vector<T> &x, const char c) {
  for (auto it = x.cbegin(); it != x.cend(); it++) {
    if (it != x.cbegin()) putchar(c);
    _W(*it, c);
  }
}
void W() {}
template <typename T, typename... K>
void W(const T &head, const K &...tail) {
  _W(head, ' ');
  cout << (sizeof...(tail) ? ' ' : '\n') << flush;
  W(tail...);
}
const double PI =
    3.14159265358979323846264338327950288419716939937510582097494459230;
template <typename T>
inline T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
template <typename T>
inline void amin(T &x, T y) {
  if (x > y) x = y;
}
template <typename T>
inline void amax(T &x, T y) {
  if (x < y) x = y;
}
template <typename A, typename B>
class comp {
 public:
  bool operator()(const pair<A, B> &a, const pair<A, B> &b) {
    if (a.first != b.first)
      return a.first < b.first;
    else
      return a.first > b.first;
  }
};
int n, st, x;
int a[50007];
mt19937 mt(time(0));
void preprocess(void) { return; }
pair<int, int> query(int idx) {
  cout << "? " << idx << endl;
  fflush(stdout);
  int val, nxt;
  cin >> val >> nxt;
  return pair<int, int>(val, nxt);
}
int ra(int idz) { return mt() % idz; }
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.precision(20);
  preprocess();
  int teeee;
  teeee = 1;
  for (int zeeee = (1); zeeee <= (teeee); zeeee++) {
    R(n, st, x);
    for (int i = (0); i <= ((int)(n)-1); i++) {
      a[i] = i + 1;
    }
    swap(a[0], a[st - 1]);
    random_shuffle(a + 1, a + n, ra);
    int pre = -1;
    for (int i = (0); i <= ((int)(min(n, 1000)) - 1); i++) {
      pair<int, int> t = query(a[i]);
      if (t.first > pre && t.first <= x) {
        st = a[i];
        pre = t.first;
      }
    }
    pair<int, int> t = {-1, -1};
    while (st > 0) {
      t = query(st);
      if (t.first >= x) {
        break;
      }
      st = t.second;
      t = {-1, -1};
    }
    cout << "! " << t.first << endl;
    return 0;
  }
  cerr << (clock() / (double)CLOCKS_PER_SEC) << endl;
  return 0;
}
