#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:200000000")
const double EPS = 1E-9;
const int INF = 1000000000;
const long long INF64 = (long long)1E18;
const double PI = 3.1415926535897932384626433832795;
int g[110][110], l[110], r[110];
void no() {
  puts("-1");
  exit(0);
}
int main() {
  for (int i = 0; i < (int)(4); i++)
    for (int j = i + 1; j < 4; j++) cin >> g[i][j];
  r[0] = -1;
  r[1] = g[0][1] - 1;
  l[2] = r[1] + 1;
  r[2] = l[2] + g[0][2] - 1;
  int sum = g[0][1] + g[0][2];
  if (sum < g[1][2]) no();
  if ((sum - g[1][2]) % 2 == 1) no();
  int c12 = 0;
  while (sum > g[1][2]) {
    sum -= 2;
    c12++;
    l[2]--;
    r[2]--;
  }
  if (l[2] < 0) no();
  int n0 = g[0][3];
  int n1 = g[0][1] + g[0][3] - g[1][3];
  int n2 = g[0][2] + g[0][3] - g[2][3];
  if (n1 < 0 || n2 < 0 || n1 % 2 == 1 || n2 % 2 == 1) no();
  n1 /= 2;
  n2 /= 2;
  int fnd = -1;
  for (int i = 0; i <= c12 && i <= n1 && i <= n2; i++) {
    int nn1 = n1 - i;
    int nn2 = n2 - i;
    int need = nn1 + nn2 + i;
    if (need > n0) continue;
    if (nn1 > g[0][1] - c12 || nn2 > g[0][2] - c12) continue;
    fnd = i;
    break;
  }
  if (fnd == -1) no();
  int com = fnd;
  n1 -= com;
  n2 -= com;
  if (n1 + n2 + com > n0) no();
  string s3 = string(n1, 'b') + string(g[0][1] - c12 - n1, 'a');
  s3 += string(com, 'b') + string(c12 - com, 'a');
  s3 += string(n2, 'b') + string(g[0][2] - c12 - n2, 'a');
  s3 += string(n0 - (n1 + n2 + com), 'b');
  cout << (int)s3.size() << endl;
  for (int i = 0; i < (int)(3); i++) {
    string s(s3.size(), 'a');
    for (int j = l[i]; j <= r[i]; j++) s[j] = 'b';
    puts(s.c_str());
  }
  puts(s3.c_str());
  return 0;
}
