#include <bits/stdc++.h>
const double EPS = 1e-10;
using namespace std;
int a[7][8];
vector<vector<double> > m(7, vector<double>(8));
vector<double> gauss() {
  int i, j, k;
  for (i = 0; i < 7; i++)
    for (j = 0; j < 8; j++) m[i][j] = (double)a[i][j];
  for (i = 0; i < 7; i++) {
    int p = i;
    for (j = i + 1; j < 7; j++)
      if (abs(m[j][i]) > abs(m[p][i])) p = j;
    if (i != p) swap(m[p], m[i]);
    if (abs(m[i][i]) < EPS) return vector<double>();
    for (j = i + 1; j < 8; j++) m[i][j] /= m[i][i];
    for (j = 0; j < 7; j++)
      if (i != j && m[j][i] != 0)
        for (k = i + 1; k < 8; k++) m[j][k] -= m[i][k] * m[j][i];
  }
  vector<double> ans(7);
  for (i = 0; i < 7; i++) ans[i] = m[i][7];
  return ans;
}
char c[4][200000];
int main() {
  int i, j, k, cnt = 0;
  a[0][0] = 1;
  for (i = 0; i < 3; i++)
    for (j = i + 1; j < 4; j++) {
      cnt++;
      for (k = 1; k <= 7; k++) a[cnt][k - 1] = ((k >> i) & 1) ^ ((k >> j) & 1);
    }
  for (i = 1; i <= 6; i++) scanf("%d", &a[i][7]);
  vector<double> v(7);
  vector<int> v2(7), ans(7);
  int len = 10000000;
  for (i = 0; i <= 100000; i++) {
    a[0][7] = i;
    v = gauss();
    int s = 0, t;
    bool f = true;
    for (j = 0; j < 7; j++) {
      t = (int)(v[j] + EPS);
      if (t < 0 || abs(t - v[j]) > EPS) {
        f = false;
        break;
      }
      s += t;
      v2[j] = t;
    }
    if (f && s < len) {
      len = s;
      ans = v2;
    }
  }
  if (len == 10000000) {
    printf("-1\n");
    return 0;
  }
  cnt = 0;
  for (i = 1; i <= 7; i++)
    for (j = 1; j <= ans[i - 1]; j++, cnt++)
      for (k = 0; k < 4; k++) c[k][cnt] = ((i >> k) & 1) + 'a';
  printf("%d\n", len);
  for (k = 0; k < 4; k++) {
    c[k][cnt] = '\0';
    puts(c[k]);
  }
  return 0;
}
