func_code_string: #include <bits/stdc++.h>   using namespace std;   double EPS = 1e-9;   int conversion(string p) {     int o;     o = atoi(p.c_str());     return o;   }   string toString(int h) {     stringstream ss;     ss << h;     return ss.str();   }   long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }   long long lcm(long long a, long long b) { return (a * (b / gcd(a, b))); }   long long toi(string p) {     long long x;     istringstream in(p);     in >> x;     return x;   }   long long square(long long n) { return n * n; }   long long fastexp(long long base, long long power) {     if (power == 0)       return 1LL;     else if (power % 2 == 0)       return square(fastexp(base, power / 2));     else       return base * (fastexp(base, power - 1));   }   bool is_prime(int n) {     for (int i = 2; i * i <= n; i++)       if (n % i == 0) return 0;     return 1;   }   int logba(int a, int b) { return log(a) / log(b); }   int rd(double d) {     int x = (int)((double)d + 0.5);     return x;   }   vector<pair<int, int> > W, B, Q;   char lab[8][8];   bool go(int x, int y, int id) {     if (id == 0) {       for (int i = x - 1; i >= 0; i--) {         if (lab[i][y] !=  . ) return false;       }     } else {       for (int i = x + 1; i < 8; i++) {         if (lab[i][y] !=  . ) return false;       }     }     return true;   }   int main() {     int res = 0, x, y;     for (int i = 0; i < 8; i++) {       for (int j = 0; j < 8; j++) {         cin >> lab[i][j];         if (lab[i][j] ==  W ) W.push_back(make_pair(i, j));         if (lab[i][j] ==  B ) B.push_back(make_pair(i, j));       }     }     for (int i = 0; i < W.size(); i++) {       x = W[i].first;       y = W[i].second;       if (go(x, y, 0)) Q.push_back(make_pair(x, 0));     }     for (int i = 0; i < B.size(); i++) {       x = B[i].first;       y = B[i].second;       if (go(x, y, 1)) Q.push_back(make_pair(7 - x, 1));     }     sort(Q.begin(), Q.end());     if (Q[0].second == 0)       cout <<  A  << endl;     else       cout <<  B  << endl;   }   