#include <bits/stdc++.h>
using namespace std;
double Mat[7][7] = {
    {-0.50000, 0.00000, 0.00000, 0.00000, -0.50000, -0.50000, 1.00000},
    {0.50000, 0.50000, 0.00000, 0.50000, 0.00000, 0.50000, -1.00000},
    {0.50000, 0.00000, 0.50000, 0.50000, 0.50000, 0.00000, -1.00000},
    {-0.50000, -0.50000, -0.50000, 0.00000, 0.00000, 0.00000, 1.00000},
    {0.00000, -0.50000, 0.00000, -0.50000, -0.50000, 0.00000, 1.00000},
    {0.00000, 0.00000, -0.50000, -0.50000, 0.00000, -0.50000, 1.00000},
    {0.00000, 0.50000, 0.50000, 0.00000, 0.50000, 0.50000, -1.00000}};
char S[7][3] = {
    {'b', 'a', 'a'}, {'b', 'a', 'b'}, {'b', 'b', 'a'}, {'b', 'b', 'b'},
    {'a', 'a', 'b'}, {'a', 'b', 'a'}, {'a', 'b', 'b'},
};
double V[7], Ans[7];
char Res[4][300010];
int main() {
  scanf("%lf", &V[3]);
  scanf("%lf", &V[4]);
  scanf("%lf", &V[5]);
  scanf("%lf", &V[1]);
  scanf("%lf", &V[2]);
  scanf("%lf", &V[0]);
  for (int l = 1; l <= 300000; ++l) {
    V[6] = 1.0 * l;
    for (int i = 0; i < 7; ++i) Ans[i] = 0;
    for (int i = 0; i < 7; ++i)
      for (int j = 0; j < 7; ++j) Ans[i] += V[j] * Mat[i][j];
    bool OK = 1;
    for (int i = 0; i < 7; ++i)
      if (fabs(Ans[i] - int(Ans[i])) > 1e-5 || Ans[i] < 0) OK = 0;
    if (OK) {
      printf("%i\n", l);
      for (int i = 0; i < l; ++i) Res[0][i] = 'a';
      int Start = 0, End;
      for (int i = 0; i < 7; ++i) {
        End = Start + int(Ans[i]);
        for (int j = Start; j < End; ++j)
          for (int k = 1; k < 4; ++k) Res[k][j] = S[i][k - 1];
        Start = End;
      }
      for (int i = 0; i < 4; ++i) {
        for (int j = 0; j < l; ++j) printf("%c", Res[i][j]);
        printf("\n");
      }
      return 0;
    }
  }
  printf("-1\n");
}
