#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
vector<int> v;
int val[MAXN];
int main() {
  srand(time(NULL));
  int n, start, s;
  cin >> n >> start >> s;
  for (int i = 1; i <= n; i++) v.push_back(i);
  int Max = -1, mind = 0, next = start;
  random_shuffle(v.begin(), v.end());
  int cnt = 0;
  for (int i = 0; i < 999; i++) {
    if (i >= v.size()) break;
    int ind = v[i];
    cout << "? " << ind << endl;
    cnt++;
    int x, y;
    cin >> x >> y;
    val[ind + 1] = x;
    if (x == s) {
      cout << "! " << s << endl;
      return 0;
    }
    if (x < s and Max < x) Max = x, mind = ind, next = y;
    if (s - Max <= 1999 - i) break;
  }
  while (Max < s) {
    if (cnt == 1999) break;
    if (next == -1) break;
    mind = next;
    cout << "? " << mind << endl;
    cnt++;
    int x, y;
    cin >> x >> y;
    Max = x;
    next = y;
  }
  if (Max < s)
    cout << "! " << -1 << endl;
  else
    cout << "! " << Max << endl;
  return 0;
}
