#include <bits/stdc++.h>
using namespace std;
int n, start, x, p = 1, maxx = -1, maxp, maxnp = -1, in1, in2, times;
void endd(void) {
  if (in1 == -1 && in2 == -1) exit(0);
}
void ask(int a) {
  cout << "? " << a << endl;
  cin >> in1 >> in2;
}
int main() {
  cin >> n >> start >> x;
  srand((unsigned int)time(NULL));
  int g = ((n / 800) * 2) + 1;
  p = start;
  cout << "? " << p << endl;
  cin >> in1 >> in2;
  if (in1 >= x) {
    cout << "! " << in1 << endl;
    return 0;
  }
  endd();
  maxx = in1;
  maxnp = p;
  maxp = in2;
  p = 1;
  for (int i = 1; i <= 990; i++) {
    cout << "? " << p << endl;
    cin >> in1 >> in2;
    endd();
    if (in1 > maxx && in1 <= x) {
      if (in1 == x) {
        cout << "! " << in1 << endl;
        return 0;
      }
      maxx = in1;
      maxnp = p;
      maxp = in2;
    }
    p += (rand() % g + 1);
    if (p > n) p = 1;
  }
  if (maxnp == -1) {
    cout << "! " << -1 << endl;
    return 0;
  }
  if (maxp == -1) {
    cout << "! " << -1 << endl;
    return 0;
  }
  for (int i = 1; i <= 990; i++) {
    cout << "? " << maxnp << endl;
    cin >> in1 >> in2;
    endd();
    if (in1 >= x) {
      cout << "! " << in1 << endl;
      return 0;
    } else if (in2 == -1) {
      cout << "! " << -1 << endl;
      return 0;
    }
    maxnp = in2;
  }
  cout << "! " << -1 << endl;
  return 0;
}
