func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<string> a;   long long i, j, k, sumA = 0, sumB = 0, min_sumA = 8, min_sumB = 8;   string t;   int main() {     for (i = 0; i < 8; i++) {       cin >> t;       a.push_back(t);     }     for (i = 0; i < 8; i++)       for (j = 0; j < 8; j++) {         sumA = sumB = 0;         if (a[i][j] ==  W ) {           for (k = i - 1; k >= 0; k--)             if (a[k][j] !=  B )               ++sumA;             else {               sumA = min_sumA;               break;             }           sumB = min_sumB;         } else if (a[i][j] ==  B ) {           for (k = i + 1; k < 8; k++)             if (a[k][j] !=  W )               ++sumB;             else {               sumB = min_sumB;               break;             }           sumA = min_sumA;         } else {           sumA = min_sumA;           sumB = min_sumB;         }         if (sumA < min_sumA) min_sumA = sumA;         if (sumB < min_sumB) min_sumB = sumB;       }     if (min_sumA <= min_sumB)       printf( A );     else       printf( B );     return 0;   }   