func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, start, x;   pair<int, int> ask(int v) {     printf( ? %d n , v);     fflush(stdout);     int value, nxt;     scanf( %d %d , &value, &nxt);     return pair<int, int>(value, nxt);   }   const int RANDOM_Q = 1000;   int main() {     srand(time(NULL));     scanf( %d %d %d , &n, &start, &x);     vector<int> v;     for (int i = int(1); i < int(n + 1); i++) {       v.push_back(i);     }     random_shuffle(v.begin(), v.end());     vector<int> randoms;     for (int i = int(0); i < int(min(RANDOM_Q, (int)v.size())); i++) {       randoms.push_back(v[i]);     }     int ans = (int)2e9;     int possible_start = start, start_val = -1;     for (auto &each : randoms) {       pair<int, int> p = ask(each);       if (p.first >= x && p.first < ans) {         ans = p.first;       } else if (p.first < x && p.first > start_val) {         possible_start = p.second;         start_val = p.first;       }     }     int cur = possible_start;     for (int i = 0; cur != -1 && i < 1999 - RANDOM_Q; i++) {       pair<int, int> p = ask(cur);       if (p.first >= x) {         ans = p.first;         break;       }       cur = p.second;     }     printf( ! %d n , ans == (int)2e9 ? -1 : ans);     fflush(stdout);     return 0;   }   