#include <bits/stdc++.h>
using namespace std;
const int N = 2e5, inf = 1e9 + 10, QQ = 1000;
int was[N], n, start, x, val[N], nex[N];
int getr() { return rand() + rand(); }
int main() {
  srand(time(NULL));
  cin >> n >> start >> x;
  fill(val, val + n + 2, -2);
  fill(nex, nex + n + 2, -2);
  int mx = inf, mn = -1, R = -1, L = start;
  for (int i = 0; i < min(QQ, n - 1); ++i) {
    int cur = 1, cnt = 0;
    while (was[cur]) cur = getr() % n + 1;
    if (was[cur]) continue;
    cout << "? " << cur << endl;
    cin >> val[cur] >> nex[cur];
    was[cur] = 1;
    if (val[cur] >= x) {
      if (val[cur] < mx) {
        mx = val[cur];
        R = cur;
      }
    }
    if (val[cur] < x) {
      if (val[cur] > mn) {
        mn = val[cur];
        L = cur;
      }
    }
  }
  int cur = L;
  while (1) {
    if (cur == -1) {
      cout << "! " << -1 << '\n';
      break;
    }
    if (val[cur] == -2) {
      cout << "? " << cur << endl;
      cin >> val[cur] >> nex[cur];
    }
    if (val[cur] >= x) {
      cout << "! " << val[cur] << '\n';
      break;
    }
    cur = nex[cur];
  }
  exit(0);
  return 0;
}
