#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
const int INF = 1000 * 1000 * 1000;
const long long LINF = 1000000000000000000LL;
const double eps = 1e-7;
void prepare() {}
const int nmax = 1000005;
int h[5][5];
double a[15][15];
char s[4][nmax];
int b[15];
int n = 7, m = 7;
void rec() {
  int len = b[0] + b[1] + b[2] + b[3] + b[4] + b[5] + b[6];
  for (int i = 0; i < len; i++) s[0][i] = 'a';
  for (int i = 0; i < b[0] + b[1] + b[2]; i++) {
    s[1][i] = 'a';
  }
  for (int i = b[0] + b[1] + b[2]; i < len; i++) {
    s[1][i] = 'b';
  }
  for (int i = 0; i < b[0]; i++) {
    s[2][i] = 'a';
  }
  for (int i = b[0]; i < b[0] + b[1] + b[2]; i++) {
    s[2][i] = 'b';
  }
  for (int i = b[0] + b[1] + b[2]; i < b[0] + b[1] + b[2] + b[3] + b[4]; i++) {
    s[2][i] = 'a';
  }
  for (int i = b[0] + b[1] + b[2] + b[3] + b[4]; i < len; i++) {
    s[2][i] = 'b';
  }
  int cur = 0;
  for (int i = 0; i < 7; i++) {
    char need = (i & 1) ? 'a' : 'b';
    for (int j = cur; j < cur + b[i]; j++) {
      s[3][j] = need;
    }
    cur += b[i];
  }
}
void init_gauss(int len) {
  memset((a), 0, sizeof(a));
  a[0][7] = h[1][4];
  a[0][0] = 1;
  a[0][2] = 1;
  a[0][4] = 1;
  a[0][6] = 1;
  a[1][7] = h[2][4];
  a[1][0] = 1;
  a[1][2] = 1;
  a[1][3] = 1;
  a[1][5] = 1;
  a[2][7] = h[3][4];
  a[2][0] = 1;
  a[2][1] = 1;
  a[2][4] = 1;
  a[2][5] = 1;
  a[3][7] = h[1][3];
  a[3][1] = 1;
  a[3][2] = 1;
  a[3][5] = 1;
  a[3][6] = 1;
  a[4][7] = h[2][3];
  a[4][1] = 1;
  a[4][2] = 1;
  a[4][3] = 1;
  a[4][4] = 1;
  a[5][7] = h[1][2];
  a[5][3] = 1;
  a[5][4] = 1;
  a[5][5] = 1;
  a[5][6] = 1;
  a[6][7] = len;
  for (int i = 0; i < n; i++) a[6][i] = 1;
}
void print() {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= m; j++) {
      printf("%.3lf ", a[i][j]);
    }
    printf("\n");
  }
  printf("\n");
}
bool check(int len) {
  init_gauss(len);
  for (int c = 0, r = 0; c < n && r < n; c++) {
    int cur = r;
    for (int i = r; i < n; i++) {
      if (fabs(a[i][c]) > fabs(a[cur][c])) cur = i;
    }
    if (fabs(a[cur][c]) < eps) {
      int xx = -1;
      continue;
    }
    for (int i = c; i <= m; i++) {
      swap(a[cur][i], a[r][i]);
    }
    for (int i = 0; i <= m; i++) {
      if (i != c) {
        a[r][i] /= a[r][c];
      }
    }
    a[r][c] = 1.0;
    for (int i = 0; i < n; ++i) {
      if (i != r) {
        double delta = a[i][c] / a[r][c];
        for (int j = c; j <= m; ++j) a[i][j] -= a[r][j] * delta;
      }
    }
    r++;
  }
  for (int i = 0; i < n; i++) {
    b[i] = a[i][m] + eps;
  }
  init_gauss(len);
  for (int i = 0; i < n; i++) {
    double res = 0.0;
    for (int j = 0; j < m; j++) {
      res += b[j] * a[i][j];
    }
    if (fabs(res - a[i][m]) > eps) {
      return false;
    }
  }
  return true;
}
bool solve() {
  for (int i = 1; i <= 4; i++) {
    for (int j = i + 1; j <= 4; j++) {
      cin >> h[i][j];
    }
  }
  for (int it = 1; it <= 1000 * 1000; it++) {
    if (check(it)) {
      rec();
      printf("%d\n", it);
      printf("%s\n%s\n%s\n%s\n", s[0], s[1], s[2], s[3]);
      return false;
    }
  }
  printf("-1\n");
  return false;
}
int main() {
  prepare();
  while (solve())
    ;
  return 0;
}
