#include <bits/stdc++.h>
using namespace std;
long long int m, n, k, p1, p2, a[60000], p3, p, f, ran[60000];
pair<long long int, long long int> query(long long int x) {
  cout << "? " << x + 1 << endl;
  fflush(stdout);
  long long int x1, x2;
  cin >> x1 >> x2;
  a[x2 - 1] = x1;
  p++;
  return {x1, x2 - 1};
}
void ini() {
  for (long long int i = 0; i < n; i++) {
    ran[i] = i;
  }
  random_shuffle(ran, ran + n);
  random_shuffle(ran, ran + n);
}
long long int getR(long long int ind) { return ran[ind]; }
void ou(long long int ans) {
  if (ans > 1e10) ans = -1;
  cout << "! " << ans << endl;
  fflush(stdout);
}
int main() {
  long long int st, x;
  cin >> n >> st >> x;
  ini();
  pair<long long int, long long int> oo = query(st - 1);
  if (oo.first >= x) {
    ou(oo.first);
    return 0;
  }
  long long int lef = st - 1, ri = -1;
  long long int minel = -1, maxel = 100000000000000000;
  long long int ind = 0;
  long long int ans = 100000000000000000;
  long long int lim = min((long long int)1000, n);
  while (lim--) {
    pair<long long int, long long int> temp = query(getR(ind));
    if (temp.first > minel && temp.first < x) {
      minel = temp.first;
      lef = temp.second;
    }
    if (temp.first < maxel && temp.first >= x) {
      maxel = temp.first;
      ans = min(temp.first, ans);
      ri = temp.second;
    }
    if (temp.second == x) {
      break;
    }
    ind = (ind + 1) % n;
  }
  if (lef == -2 || ans == x) {
    ou(ans);
    return 0;
  }
  pair<long long int, long long int> temp = query(lef);
  if (temp.first >= x) {
    ou(temp.first);
    return 0;
  }
  while (lef != ri) {
    lef = temp.second;
    if (lef == -2) {
      ou(ans);
      return 0;
    }
    temp = query(lef);
    if (temp.first >= x) {
      ou(temp.first);
      return 0;
    }
  }
  return 0;
}
