func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     vector<string> A(8);     int mnA = 1e3, mnB = 1e3;     for (int i = 0; i < 8; i++) cin >> A[i];     for (int i = 0; i < 8; i++)       for (int u = 0; u < 8; u++) {         if (A[i][u] ==  B ) {           bool b = false;           for (int j = i + 1; j < 8; j++)             if (A[j][u] ==  B  || A[j][u] ==  W ) b = true;           if (!b) mnB = min(mnB, 7 - i);         } else if (A[i][u] ==  W ) {           bool b = false;           for (int j = i - 1; j >= 0; j--) {             if (A[j][u] ==  B  || A[j][u] ==  W ) b = true;           }           if (!b) mnA = min(mnA, i);         }       }     if (mnA <= mnB)       cout <<  A ;     else       cout <<  B ;     return 0;   }   