func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     pair<int, int> a, b, c;     int s = 0;     cin >> a.first >> a.second >> b.first >> b.second >> c.first >> c.second;     s = a.first * a.second + b.first * b.second + c.first * c.second;     if ((int)sqrt(s + 0.0) * (int)sqrt(s + 0.0) != s) {       cout << -1;       return 0;     }     s = sqrt(s + 0.0);     if (a.first < a.second) swap(a.first, a.second);     if (b.first < b.second) swap(b.first, b.second);     if (c.first < c.second) swap(c.first, c.second);     char mp[] = { A ,  B ,  C };     if (a.first < b.first) {       swap(a, b);       swap(mp[0], mp[1]);     }     if (b.first < c.first) {       swap(mp[1], mp[2]);       swap(b, c);     }     if (a.first < b.first) {       swap(mp[0], mp[1]);       swap(a, b);     }     if (a.first == s) {       if (b.first == c.first && a.first == b.first) {         if (a.second + b.second + c.second == s) {           cout << s << endl;           for (int i = 0; i < a.second; ++i, cout << endl)             for (int j = 0; j < a.first; ++j) cout << mp[0];           for (int i = 0; i < b.second; ++i, cout << endl)             for (int j = 0; j < b.first; ++j) cout << mp[1];           for (int i = 0; i < c.second; ++i, cout << endl)             for (int j = 0; j < c.first; ++j) cout << mp[2];         }       } else if (b.second + c.second == a.first && a.second + b.first == s &&                  b.first == c.first) {         cout << s << endl;         for (int i = 0; i < a.second; ++i, cout << endl)           for (int j = 0; j < a.first; ++j) cout << mp[0];         for (int i = 0; i < b.first; ++i, cout << endl)           for (int j = 0; j < s; ++j)             if (j < b.second)               cout << mp[1];             else               cout << mp[2];       } else if (b.first + c.first == a.first && a.second + b.second == s &&                  b.second == c.second) {         cout << s << endl;         for (int i = 0; i < a.second; ++i, cout << endl)           for (int j = 0; j < a.first; ++j) cout << mp[0];         for (int i = 0; i < s - a.second; ++i, cout << endl)           for (int j = 0; j < s; ++j)             if (j < b.first)               cout << mp[1];             else               cout << mp[2];       } else if (b.first + c.second == a.first && a.second + b.second == s &&                  b.second == c.first) {         cout << s << endl;         for (int i = 0; i < a.second; ++i, cout << endl)           for (int j = 0; j < a.first; ++j) cout << mp[0];         for (int i = 0; i < s - a.second; ++i, cout << endl)           for (int j = 0; j < s; ++j)             if (j < b.first)               cout << mp[1];             else               cout << mp[2];       } else         cout << -1;     } else       cout << -1;   }   