func_code_string: #include <bits/stdc++.h>   using namespace std;   long long modinverse(long long a, long long m) {     long long m0 = m;     long long y = 0, x = 1;     if (m == 1) return 0;     while (a > 1) {       long long q = a / m, t = m;       m = a % m, a = t;       t = y;       y = x - q * y;       x = t;     }     if (x < 0) x += m0;     return x;   }   long long mod_pow(long long a, long long n, long long p) {     long long ans = 1;     while (n) {       if (n & 1) ans = (ans * a) % p;       a = (a * a) % p;       n >>= 1;     }     return ans;   }   long long prime_mod_pow(long long a, long long n, long long p) {     long long ans = 1;     n %= p - 1;     while (n) {       if (n & 1) ans = (ans * a) % p;       a = (a * a) % p;       n >>= 1;     }     return ans;   }   long long gcd(long long a, long long b) {     if (b == 0) return a;     return gcd(b, a % b);   }   long long ext_gcd(long long l, long long r, long long &x, long long &y) {     if (l == 0) {       x = 0;       y = 1;       return r;     }     long long x1, y1, g;     g = ext_gcd(r % l, l, x1, y1);     x = y1 - (r / l) * x1;     y = x1;     return g;   }   const long long dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};   long long ok(long long x, long long y, long long n, long long m) {     return (x >= 0 and y >= 0 and x < n and y < m);   }   long long num_div;   map<long long, long long> pr_factor;   void factorise(long long n) {     long long count = 0;     while (!(n % 2)) {       n >>= 1;       count++;     }     if (count) num_div *= (count + 1);     pr_factor[2] = count;     for (long long i = 3; i <= sqrt(n); i += 2) {       count = 0;       while (n % i == 0) {         count++;         n /= i;       }       if (count) num_div *= (count + 1);       pr_factor[i] = count;     }     if (n > 2) num_div *= 2;     pr_factor[n] = 1;   }   bool type1(long long x1, long long x2, long long x3, long long y1, long long y2,              long long y3, char c1, char c2, char c3) {     if (x1 == x2 + x3 and y2 == y3 and x1 == y1 + y2) {       cout << x1 <<   n ;       for (long long i = 0; i < y1; i++) {         for (long long j = 0; j < x1; j++) cout << c1;         cout <<   n ;       }       for (long long i = 0; i < y2; i++) {         for (long long j = 0; j < x2; j++) cout << c2;         for (long long j = 0; j < x3; j++) cout << c3;         cout <<   n ;       }       return true;     }     return false;   }   bool type2(long long x1, long long x2, long long x3, long long y1, long long y2,              long long y3, char c1, char c2, char c3) {     if (x1 == x2 and x2 == x3 and x1 == y1 + y2 + y3) {       cout << x1 <<   n ;       for (long long i = 0; i < y1; i++) {         for (long long j = 0; j < x1; j++) cout << c1;         cout <<   n ;       }       for (long long i = 0; i < y2; i++) {         for (long long j = 0; j < x1; j++) cout << c2;         cout <<   n ;       }       for (long long i = 0; i < y3; i++) {         for (long long j = 0; j < x3; j++) cout << c3;         cout <<   n ;       }       return true;     }     return false;   }   void solve() {     long long x1, x2, x3, y1, y2, y3;     cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;     vector<pair<long long, long long> > a;     a.push_back(make_pair(x1, y1));     a.push_back(make_pair(y1, x1));     vector<pair<long long, long long> > b;     b.push_back(make_pair(x2, y2));     b.push_back(make_pair(y2, x2));     vector<pair<long long, long long> > c;     c.push_back(make_pair(x3, y3));     c.push_back(make_pair(y3, x3));     for (long long i = 0; i < a.size(); i++) {       long long X1 = a[i].first, Y1 = a[i].second;       for (long long j = 0; j < b.size(); j++) {         long long X2 = b[j].first, Y2 = b[j].second;         for (long long k = 0; k < c.size(); k++) {           long long X3 = c[k].first, Y3 = c[k].second;           if (type1(X1, X2, X3, Y1, Y2, Y3,  A ,  B ,  C )) return;           if (type1(X1, X3, X2, Y1, Y3, Y2,  A ,  C ,  B )) return;           if (type1(X2, X1, X3, Y2, Y1, Y3,  B ,  A ,  C )) return;           if (type1(X2, X3, X1, Y2, Y3, Y1,  B ,  C ,  A )) return;           if (type1(X3, X1, X2, Y3, Y1, Y2,  C ,  A ,  B )) return;           if (type1(X3, X2, X1, Y3, Y2, Y1,  C ,  B ,  A )) return;           if (type2(X1, X2, X3, Y1, Y2, Y3,  A ,  B ,  C )) return;           if (type2(X1, X3, X2, Y1, Y3, Y2,  A ,  C ,  B )) return;           if (type2(X2, X1, X3, Y2, Y1, Y3,  B ,  A ,  C )) return;           if (type2(X2, X3, X1, Y2, Y3, Y1,  B ,  C ,  A )) return;           if (type2(X3, X1, X2, Y3, Y1, Y2,  C ,  A ,  B )) return;           if (type2(X3, X2, X1, Y3, Y2, Y1,  C ,  B ,  A )) return;         }       }     }     cout << -1 <<   n ;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     int t = 1;     long long tc = 1;     while (t--) {       solve();       tc++;     }   }   