#include <bits/stdc++.h>
int x[22], h[11][11], pppp;
char data[2002000][5];
bool can(int k) {
  if (k < 0) return false;
  if (k % 2) return false;
  return true;
}
bool write() {
  x[6] = x[2] - x[7];
  x[8] = x[3] - x[9];
  x[10] = x[4] - x[11];
  if ((x[6] < 0) || (x[7] < 0) || (x[8] < 0)) return false;
  for (int i = 1; i <= x[5]; ++i) strcpy(data[++pppp], "aaab");
  for (int i = 1; i <= x[6]; ++i) strcpy(data[++pppp], "aaba");
  for (int i = 1; i <= x[7]; ++i) strcpy(data[++pppp], "aabb");
  for (int i = 1; i <= x[8]; ++i) strcpy(data[++pppp], "abaa");
  for (int i = 1; i <= x[9]; ++i) strcpy(data[++pppp], "abab");
  for (int i = 1; i <= x[10]; ++i) strcpy(data[++pppp], "abba");
  for (int i = 1; i <= x[11]; ++i) strcpy(data[++pppp], "abbb");
  printf("%d\n", x[5] + x[6] + x[7] + x[8] + x[9] + x[10] + x[11]);
  for (int k = 0; k <= 3; ++k) {
    for (int i = 1; i <= pppp; ++i) printf("%c", data[i][k]);
    printf("\n");
  }
  return true;
}
void work() {
  for (x[5] = 0; x[5] <= h[1][4]; ++x[5]) {
    int h14 = h[1][4] - x[5], h24 = h[2][4] - x[5], h34 = h[3][4] - x[5];
    x[7] = (h14 + h24 - x[3] - x[4]) / 2;
    x[11] = (x[2] + x[3] + x[4] + x[4] - h24 - h34) / 2;
    x[9] = h14 - x[7] - x[11];
    if ((h14 < 0) || (h24 < 0) || (h34 < 0)) continue;
    if (!can(h14 + h24 - x[3] - x[4])) continue;
    if (!can(x[2] + x[3] + x[4] + x[4] - h24 - h34)) continue;
    if (write()) return;
  }
  printf("-1\n");
}
int main() {
  for (int i = 1; i < 4; ++i)
    for (int j = i + 1; j <= 4; ++j) scanf("%d", &h[i][j]);
  x[1] = h[1][2];
  x[2] = (h[2][3] + h[1][3] - h[1][2]) / 2;
  x[4] = h[1][3] - x[2];
  x[3] = x[1] - x[4];
  if ((x[2] < 0) || (x[3] < 0) || (x[4] < 0)) {
    printf("-1\n");
    return 0;
  }
  if (!can(h[2][3] + h[1][3] - h[1][2])) {
    printf("-1\n");
    return 0;
  }
  work();
  return 0;
}
