func_code_string: #include <bits/stdc++.h>   using namespace std;   int solveA(pair<pair<int, int>, int> x, pair<pair<int, int>, int> y,              pair<pair<int, int>, int> z) {     pair<int, int> a = x.first;     pair<int, int> b = y.first;     pair<int, int> c = z.first;     int n = a.first + b.first + c.first;     if (n != a.second) return -1;     if (n != b.second) return -1;     if (n != c.second) return -1;     cout << n <<   n ;     for (int i = 1; i <= a.first; ++i) {       for (int j = 1; j <= a.second; ++j) {         cout << (char)( A  + x.second);       }       cout <<   n ;     }     for (int i = 1; i <= b.first; ++i) {       for (int j = 1; j <= b.second; ++j) {         cout << (char)( A  + y.second);       }       cout <<   n ;     }     for (int i = 1; i <= c.first; ++i) {       for (int j = 1; j <= c.second; ++j) {         cout << (char)( A  + z.second);       }       cout <<   n ;     }     return n;   }   int solveB(pair<pair<int, int>, int> x, pair<pair<int, int>, int> y,              pair<pair<int, int>, int> z) {     pair<int, int> a = x.first;     pair<int, int> b = y.first;     pair<int, int> c = z.first;     int n = a.first;     if (n != b.first + c.first) return -1;     if (n != b.second + a.second) return -1;     if (n != c.second + a.second) return -1;     cout << n <<   n ;     for (int i = 1; i <= a.second; ++i) {       for (int j = 1; j <= n; ++j) {         cout << (char)( A  + x.second);       }       cout <<   n ;     }     for (int i = 1; i <= b.second; ++i) {       for (int j = 1; j <= b.first; ++j) {         cout << (char)( A  + y.second);       }       for (int j = 1; j <= c.first; ++j) {         cout << (char)( A  + z.second);       }       cout <<   n ;     }     return n;   }   int main(int argc, const char* argv[]) {     pair<int, int> a[3];     cin >> a[0].first >> a[0].second;     cin >> a[1].first >> a[1].second;     cin >> a[2].first >> a[2].second;     pair<pair<int, int>, int> b[3];     for (int i = 0; i < 8; ++i) {       if (i & 1)         b[0].first = a[0];       else         b[0].first = make_pair(a[0].second, a[0].first);       if (i >> 1 & 1)         b[1].first = a[1];       else         b[1].first = make_pair(a[1].second, a[1].first);       if (i >> 2 & 1)         b[2].first = a[2];       else         b[2].first = make_pair(a[2].second, a[2].first);       for (int i = 0; i <= 2; ++i) {         b[i].second = i;       }       sort(b, b + 3);       do {         int n;         n = solveA(b[0], b[1], b[2]);         if (n != -1) {           return 0;         }         n = solveB(b[0], b[1], b[2]);         if (n != -1) {           return 0;         }       } while (next_permutation(b, b + 3));     }     cout << -1;     return 0;   }   