#include <bits/stdc++.h>
#pragma GCC optimize(3)
using namespace std;
inline int read() {
  char c = getchar();
  int x = 0;
  bool f = 0;
  for (; !isdigit(c); c = getchar()) f ^= !(c ^ 45);
  for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
  if (f) x = -x;
  return x;
}
int a, b, c, d, e, f, x[11];
string res[4];
const string qaq[11] = {"QAQ~", "aaab", "aaba", "aabb",
                        "abaa", "abab", "abba", "abbb"};
signed main() {
  a = read(), b = read(), c = read(), d = read(), e = read(), f = read();
  if ((a ^ c ^ d ^ f) % 2 || (a ^ b ^ e ^ f) % 2 || (b ^ c ^ d ^ e) % 2 ||
      (a ^ c ^ e) % 2) {
    puts("-1");
    return 0;
  };
  for (register int i = (0); i <= (1000000); ++i) {
    x[2] = i;
    x[1] = i - (d - c - e + b) / 2, x[4] = i - (b - a + f - e) / 2,
    x[7] = i - (f - c + d - a) / 2;
    x[3] = (c - a + e) / 2 - x[1];
    x[6] = (f - c - d + a) / 2 + x[3], x[5] = x[3] - (b - a - f + e) / 2;
    bool ok = 1;
    for (register int j = (1); j <= (7); ++j)
      if (x[j] < 0) ok = 0;
    if (!ok) continue;
    for (register int j = (1); j <= (7); ++j)
      for (register int k = (1); k <= (x[j]); ++k)
        for (register int kk = (0); kk <= (3); ++kk) res[kk] += qaq[j][kk];
    cout << res[1].size() << endl;
    for (register int j = (0); j <= (3); ++j) cout << res[j] << endl;
    return 0;
  }
  puts("-1");
  return 0;
}
