func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     std::ios::sync_with_stdio(false);     cin.tie(0);     int t, i, n, j, e;     char grid[8][8];     map<int, bool> black, white;     for (i = 0; i < 8; i++) {       cin >> grid[i];     }     int min = INT_MAX;     int flag = 0;     for (i = 0; i < 8; i++) {       for (j = 0; j < 8; j++) {         if (grid[i][j] ==  W ) {           int x = i;           int y = j;           int f = 1;           while (x >= 0) {             if (grid[x][j] ==  B ) {               f = 0;               break;             }             x--;           }           if (f == 1) {             if (min >= i) {               min = i;               flag = 0;             }           }         }         if (grid[i][j] ==  B ) {           int x = i;           int y = j;           int f = 1;           while (x < 8) {             if (grid[x][j] ==  W ) {               f = 0;               break;             }             x++;           }           if (f == 1) {             if (min > (7 - i)) {               min = 7 - i;               flag = 1;             }           }         }       }     }     if (flag == 0)       cout <<  A ;     else       cout <<  B ;     return 0;   }   