func_code_string: #include <bits/stdc++.h>   using namespace std;   int a, b, c, d, e, i, j, ii, jj, zx, xc, p[10009], ji, F[10009], G[10009];   pair<int, int> k[10009];   vector<int> v;   vector<int>::iterator it;   int ask(int q, int w) {     int qw = 0;     cout <<  ?   << q <<     << w << endl;     cin >> qw;     return qw;   }   int fun(int q) {     int qw = 0;     if (q != k[0].first) {       qw = ask(q, k[0].first);     } else {       qw = ask(q, k[0].second);     }     for (j = 1; j <= ji; j++) {       if (q != k[j].first) {         e = ask(q, k[j].first);       } else {         e = ask(q, k[j].second);       }       qw &= e;     }     return qw;   }   void answer() {     cout <<  ! ;     for (j = 1; j <= a; j++) {       cout <<     << p[j];     }     exit(0);   }   int main() {     ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);     cin >> a;     for (j = 0;; j++) {       if ((1 << j) >= a) break;       ji = j;     }     while (1) {       for (j = 0; j <= ji; j++) {         if (k[j].first == 0) break;       }       if (j == ji + 1) break;       c = rand() % a + 1;       d = rand() % a + 1;       if (c == d) continue;       e = ask(c, d);       for (jj = 0; jj <= ji; jj++) {         if ((e & (1 << jj)) == 0) {           k[jj].first = c;           k[jj].second = d;         }       }     }     for (i = 1; i <= a; i++) {       c = rand() % (a - i + 1) + 1;       G[i] = c;       v.push_back(i);     }     for (i = 1; i <= a; i++) {       F[i] = v[G[i] - 1];       it = v.begin() + (G[i] - 1);       v.erase(it);     }     p[F[1]] = fun(F[1]);     c = F[1];     for (i = 2; i <= a; i++) {       e = ask(c, F[i]);       if (p[c] == e) {         c = F[i];         p[c] = fun(c);       }     }     p[c] = 0;     for (i = 1; i <= a; i++) {       if (i == c) continue;       p[i] = ask(i, c);     }     answer();     return 0;   }   