#include <bits/stdc++.h>
using namespace std;
const int num = 10;
int ans[num];
int Ans;
int res[num];
int matrix[num][num] = {{0, 0, 0, 1, 1, 1, 1}, {0, 1, 1, 0, 0, 1, 1},
                        {1, 0, 1, 0, 1, 0, 1}, {0, 1, 1, 1, 1, 0, 0},
                        {1, 0, 1, 1, 0, 1, 0}, {1, 1, 0, 0, 1, 1, 0}};
char str[7][5] = {"aaab", "aaba", "aabb", "abaa", "abab", "abba", "abbb"};
void exchange_col(int p1, int p2, int n) {
  int t;
  int i;
  for (i = 0; i <= n; i++)
    t = matrix[p1][i], matrix[p1][i] = matrix[p2][i], matrix[p2][i] = t;
}
void Debug(int equ, int var) {
  int i, j;
  for (i = 0; i < equ; i++) {
    for (j = 0; j < var + 1; j++) {
      cout << matrix[i][j] << " ";
    }
    cout << endl;
  }
  cout << endl;
}
inline int Abs(int x) { return x > 0 ? x : -x; }
bool gauss(int n, int m, int MM) {
  int i, j, k;
  int r;
  for (i = 0; i < n; i++) {
    if (matrix[i][i] == 0) {
      for (j = i + 1; j < n; j++) {
        if (matrix[j][i]) {
          exchange_col(i, j, m);
          break;
        }
      }
    }
    if (matrix[i][i] == 0) return false;
    for (j = i + 1; j < n; j++) {
      r = matrix[j][i] / matrix[i][i];
      if (r == 0) continue;
      for (k = 0; k <= m; k++) {
        matrix[j][k] -= r * matrix[i][k];
      }
    }
  }
  bool found = false;
  for (int t = 0; t <= MM; ++t) {
    ans[6] = t;
    int ok = 1;
    for (i = n - 1; i >= 0; i--) {
      ans[i] = matrix[i][m];
      for (j = n; j > i; j--) ans[i] -= matrix[i][j] * ans[j];
      if (Abs(ans[i]) % Abs(matrix[i][i])) {
        ok = 0;
        break;
      }
      ans[i] /= matrix[i][i];
      if (ans[i] < 0) {
        ok = 0;
        break;
      }
    }
    if (ok) {
      int tot = 0;
      found = true;
      for (int i = 0; i <= n; ++i) {
        tot += ans[i];
      }
      if (tot < Ans) {
        Ans = tot;
        for (int i = 0; i <= n; ++i) {
          res[i] = ans[i];
        }
      }
    }
  }
  return found;
}
int main() {
  Ans = 1000000000;
  int MM = -1;
  for (int i = 0; i < 6; ++i) {
    cin >> matrix[i][7];
    if (matrix[i][7] > MM) {
      MM = matrix[i][7];
    }
  }
  if (gauss(6, 7, MM)) {
    cout << Ans << endl;
    for (int i = 0; i < 4; ++i) {
      for (int j = 0; j <= 6; ++j) {
        for (int t = 0; t < res[j]; ++t) {
          cout << str[j][i];
        }
      }
      cout << endl;
    }
  } else {
    cout << "-1" << endl;
  }
  return 0;
}
