#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, neg = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') neg = -1;
    c = getchar();
  }
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
  return x * neg;
}
inline void print(int x) {
  if (x < 0) {
    putchar('-');
    print(abs(x));
    return;
  }
  if (x <= 9)
    putchar(x + '0');
  else {
    print(x / 10);
    putchar(x % 10 + '0');
  }
}
inline int qpow(int x, int e, int _MOD) {
  int ans = 1;
  while (e) {
    if (e & 1) ans = ans * x % _MOD;
    x = x * x % _MOD;
    e >>= 1;
  }
  return ans;
}
int a, b, c, d, e, f;
char s[1000005][4];
signed main() {
  cin >> a >> b >> c >> d >> e >> f;
  if ((f - c + d - a) % 2 != 0) return puts("-1"), 0;
  if ((b - a + f - e) % 2 != 0) return puts("-1"), 0;
  if ((d - c + e - b) % 2 != 0) return puts("-1"), 0;
  if ((c - a + e) % 2 != 0) return puts("-1"), 0;
  for (int x2 = 0; x2 <= 100000; x2++) {
    int x7 = x2 - (f - c + d - a) / 2;
    int x4 = x2 - (b - a + f - e) / 2;
    int x1 = x2 - (d - c - e + b) / 2;
    int x3 = (c - a + e) / 2 - x1;
    int x6 = (f - c - (d - a)) / 2 + x3;
    int x5 = x3 - (b - a - (f - e)) / 2;
    if (x1 < 0 || x2 < 0 || x3 < 0 || x4 < 0 || x5 < 0 || x6 < 0 || x7 < 0)
      continue;
    int j = 0;
    cout << x1 + x2 + x3 + x4 + x5 + x6 + x7 << endl;
    for (int i = 1; i <= x1; i++)
      s[++j][0] = 'a', s[j][1] = 'a', s[j][2] = 'a', s[j][3] = 'b';
    for (int i = 1; i <= x2; i++)
      s[++j][0] = 'a', s[j][1] = 'a', s[j][2] = 'b', s[j][3] = 'a';
    for (int i = 1; i <= x3; i++)
      s[++j][0] = 'a', s[j][1] = 'a', s[j][2] = 'b', s[j][3] = 'b';
    for (int i = 1; i <= x4; i++)
      s[++j][0] = 'a', s[j][1] = 'b', s[j][2] = 'a', s[j][3] = 'a';
    for (int i = 1; i <= x5; i++)
      s[++j][0] = 'a', s[j][1] = 'b', s[j][2] = 'a', s[j][3] = 'b';
    for (int i = 1; i <= x6; i++)
      s[++j][0] = 'a', s[j][1] = 'b', s[j][2] = 'b', s[j][3] = 'a';
    for (int i = 1; i <= x7; i++)
      s[++j][0] = 'a', s[j][1] = 'b', s[j][2] = 'b', s[j][3] = 'b';
    for (int i = 1; i <= x1 + x2 + x3 + x4 + x5 + x6 + x7; i++) cout << s[i][0];
    puts("");
    for (int i = 1; i <= x1 + x2 + x3 + x4 + x5 + x6 + x7; i++) cout << s[i][1];
    puts("");
    for (int i = 1; i <= x1 + x2 + x3 + x4 + x5 + x6 + x7; i++) cout << s[i][2];
    puts("");
    for (int i = 1; i <= x1 + x2 + x3 + x4 + x5 + x6 + x7; i++) cout << s[i][3];
    puts("");
    return 0;
  }
  puts("-1");
  return 0;
}
