#include <bits/stdc++.h>   int x1, x2, x3, y11, y2, y3, length;   int main() {     scanf( %d %d %d %d %d %d , &x1, &y11, &x2, &y2, &x3, &y3);     length = (int)(sqrt(x1 * y11 + x2 * y2 + x3 * y3) + 0.01);     if (x1 * y11 + x2 * y2 + x3 * y3 != length * length) {       printf( -1 n );       return 0;     }     if (x1 < y11) {       int temp = x1;       x1 = y11;       y11 = temp;     }     if (x2 < y2) {       int temp = x2;       x2 = y2;       y2 = temp;     }     if (x3 < y3) {       int temp = x3;       x3 = y3;       y3 = temp;     }     if (x1 == length && x2 == length && x3 == length) {       printf( %d n , length);       for (int i = 0; i < y11; i++) {         for (int j = 0; j < x1; j++) printf( A );         printf(  n );       }       for (int i = 0; i < y2; i++) {         for (int j = 0; j < x2; j++) printf( B );         printf(  n );       }       for (int i = 0; i < y3; i++) {         for (int j = 0; j < x3; j++) printf( C );         printf(  n );       }     } else if (x1 == length) {       printf( %d n , length);       if (x2 != length - y11) {         int temp = x2;         x2 = y2;         y2 = temp;       }       if (x3 != length - y11) {         int temp = x3;         x3 = y3;         y3 = temp;       }       for (int i = 0; i < y11; i++) {         for (int j = 0; j < x1; j++) printf( A );         printf(  n );       }       for (int i = 0; i < length - y11; i++) {         for (int j = 0; j < y2; j++) printf( B );         for (int j = 0; j < y3; j++) printf( C );         printf(  n );       }     } else if (x2 == length) {       printf( %d n , length);       if (x1 != length - y2) {         int temp = x1;         x1 = y11;         y11 = temp;       }       if (x3 != length - y2) {         int temp = x3;         x3 = y3;         y3 = temp;       }       for (int i = 0; i < y2; i++) {         for (int j = 0; j < x2; j++) printf( B );         printf(  n );       }       for (int i = 0; i < length - y2; i++) {         for (int j = 0; j < y11; j++) printf( A );         for (int j = 0; j < y3; j++) printf( C );         printf(  n );       }     } else if (x3 == length) {       printf( %d n , length);       if (x1 != length - y3) {         int temp = x1;         x1 = y11;         y11 = temp;       }       if (x2 != length - y3) {         int temp = x2;         x2 = y2;         y2 = temp;       }       for (int i = 0; i < y3; i++) {         for (int j = 0; j < x3; j++) printf( C );         printf(  n );       }       for (int i = 0; i < length - y3; i++) {         for (int j = 0; j < y11; j++) printf( A );         for (int j = 0; j < y2; j++) printf( B );         printf(  n );       }     } else {       printf( -1 n );     }     return 0;   }   