#include <bits/stdc++.h>
using namespace std;
const int maxint = 2147483647;
inline int ctoi(const char c) { return c - '0'; }
inline char itoc(const int n) { return n + '0'; }
template <typename T>
inline bool in(T x, T l, T r) {
  return l <= x && x <= r;
}
template <typename T1, typename T2>
inline pair<T1, T2> mp(const T1 &fst, const T2 &scd) {
  return make_pair(fst, scd);
}
template <typename T>
inline void srt(T &a) {
  sort(a.begin(), a.end());
}
template <typename T1, typename T2>
inline int lbs(const T1 &a, const T2 k) {
  return lower_bound(a.begin(), a.end(), k);
}
template <typename T1, typename T2>
inline int ubs(const T1 &a, const T2 k) {
  return upper_bound(a.begin(), a.end(), k);
}
void expandStack() {
  int size = 67108864;
  char *p = (char *)malloc(size) + size;
  __asm__("movq %0, %%rsp\n" ::"r"(p));
}
namespace extendedIO {
const char SP = ' ';
const char CR = '\n';
inline void write(const int n) { printf("%d", n); }
inline void write(const unsigned int n) { printf("%u", n); }
inline void write(const long long n) { cout << n; }
inline void write(const double a) { printf("%f", a); }
inline void writef(const double a, const int n) { printf("%.*f", n, a); }
inline void write(const char c) { printf("%c", c); }
inline void write(const char s[] = "") { printf("%s", s); }
inline void write(const string s) { cout << s; }
inline void writes(const int *a, const int l, const int r) {
  for (int i = l; i <= r; i++) printf("%d ", a[i]);
}
template <unsigned int n>
inline void write(const int (&a)[n]) {
  for (unsigned int i = 0; i < n; i++) printf("%d ", a[i]);
}
template <typename T>
inline void write(const T a) {
  for (__typeof a.begin() i = a.begin(); i != a.end(); i++) printf("%d ", *i);
}
inline void writeln() { write(CR); }
template <typename T>
inline void writeln(const T &a) {
  write(a);
  write(CR);
}
inline void writefln(const double a, int n) {
  printf("%.*f", n, a);
  write(CR);
}
inline void writesln(const int *a, const int l, const int r) {
  for (int i = l; i <= r; i++) printf("%d ", a[i]);
  writeln(CR);
}
template <typename T>
inline void writelns(const T a) {
  for (__typeof a.begin() i = a.begin(); i != a.end(); i++) writeln(*i);
}
inline int read(int &n) {
  n = 0;
  int c;
  while (c = getchar(), in(c, 48, 57)) n = 10 * n + ctoi(c);
  return c;
}
inline int read(long long &n) {
  n = 0;
  int c;
  while (c = getchar(), in(c, 48, 57)) n = 10 * n + ctoi(c);
  return c;
}
inline int getint() {
  int n;
  if (read(n) != 45) return n;
  read(n);
  return -n;
}
inline long long getlonglong() {
  long long n;
  if (read(n) != 45) return n;
  read(n);
  return -n;
}
template <unsigned int n>
inline void read(int (&a)[n]) {
  for (unsigned int i = 0; i < n; i++) a[i] = getint();
}
inline void read(int *a, int l, int r) {
  for (int i = l; i <= r; i++) a[i] = getint();
}
inline void read(vector<int> &v, int n) {
  v.clear();
  for (int i = 0; i < n; i++) v.push_back(getint());
}
inline void read(string &str, unsigned int size) {
  char s[size];
  scanf("%s", s);
  str = string(s);
}
inline string readstr(unsigned int size = 1111) {
  string s;
  read(s, size);
  return s;
}
}  // namespace extendedIO
using namespace extendedIO;
template <typename T>
inline void clr(T &a) {
  memset(a, 0, sizeof a);
}
template <typename T>
T gcd(T a, T b) {
  return (b ? gcd(b, a % b) : a);
}
template <typename T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <typename T>
T exGcd(T a, T b, T &x, T &y) {
  T d = a;
  if (b) {
    d = exGcd(b, a % b, y, x);
    y -= a / b * x;
  } else {
    x = 1;
    y = 0;
  }
  return d;
}
int n;
char b[333][333];
void paint(int x, int y, int w, int h, char c) {
  for (int i = 0; i < w; i++)
    for (int j = 0; j < h; j++) b[x + i][y + j] = c;
}
bool inspect() {
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (b[i][j] == 'D') return false;
  return true;
}
void attempt(int x1, int y1, int x2, int y2, int x3, int y3, int dx1, int dy1,
             int dx2, int dy2) {
  int x = 1;
  int y = 1;
  paint(x, y, n, n, 'D');
  paint(x, y, x1, y1, 'A');
  paint(x += dx1, y += dy1, x2, y2, 'B');
  paint(x += dx2, y += dy2, x3, y3, 'C');
  if (inspect()) {
    writeln(n);
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) putchar(b[i][j]);
      putchar('\n');
    }
    exit(0);
  }
}
void package(int x1, int y1, int x2, int y2, int x3, int y3) {
  attempt(x1, y1, x2, y2, x3, y3, x1, 0, x2, 0);
  attempt(x1, y1, x2, y2, x3, y3, 0, y1, x2, 0);
  attempt(x1, y1, x2, y2, x3, y3, x1, 0, 0, x2);
  attempt(x1, y1, x2, y2, x3, y3, 0, y1, 0, x2);
  attempt(x1, y1, x2, y2, x3, y3, x1, 0, -x1, y1);
  attempt(x1, y1, x2, y2, x3, y3, 0, y1, x1, -y1);
  attempt(x1, y1, x2, y2, x3, y3, x1, 0, -x1, y1);
  attempt(x1, y1, x2, y2, x3, y3, 0, y1, x1, -y1);
}
void fuckit(int y3, int x1, int x3, int x2, int y1, int y2) {
  package(x1, y1, x2, y2, x3, y3);
  package(x1, y1, x2, y2, y3, x3);
  package(x1, y1, y2, x2, x3, y3);
  package(x1, y1, y2, x2, y3, x3);
  package(y1, x1, x2, y2, x3, y3);
  package(y1, x1, x2, y2, y3, x3);
  package(y1, x1, y2, x2, x3, y3);
  package(y1, x1, y2, x2, y3, x3);
}
int main() {
  int x1, y1, x2, y2, x3, y3;
  cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
  int s = x1 * y1 + x2 * y2 + x3 * y3;
  n = sqrt(s);
  if (n * n != s)
    writeln(-1);
  else {
    fuckit(y3, x1, x3, x2, y1, y2);
    writeln(-1);
  }
  return 0;
}
