func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, start, x;     cin >> n >> start >> x;     int ans = x;     int val, nt;     cout <<  ?   << start << endl;     cin >> val >> nt;     if (val >= x) {       cout <<  !   << val << endl;       return 0;     }     int best = start;     long long diff = x - val;     int step = sqrt(n);     start = ((rand() << 4 + rand()) % n + n) % n + 1;     bool was[n + 1];     fill(was, was + n + 1, 0);     for (int i = 0; i < min(1000, n / 2); i++) {       while (was[start]) {         start = ((rand() << 4 + rand()) % n + n) % n + 1;       }       was[start] = 1;       cout <<  ?   << start << endl;       cin >> val >> nt;       if (val < x and nt == -1) {         cout <<  !   << -1 << endl;         return 0;       }       if (val < x and x - val < diff) diff = x - val, best = start;     }     while (1) {       cout <<  ?   << best << endl;       cin >> val >> nt;       if (val < x and nt == -1) {         cout <<  !   << -1 << endl;         return 0;       }       if (val >= x) {         cout <<  !   << val << endl;         return 0;       }       best = nt;     }     return 0;   }   