#include <bits/stdc++.h>
using namespace std;
int zh[4][4];
int zhu[4];
char str[4][500005];
int t = 0;
void los() {
  cout << -1 << endl;
  exit(0);
}
void sing(int i, int m) {
  for (int j = 0; j < 4; j++) {
    if (j == i)
      for (int k = 0; k < m; k++) str[j][t + k] = 'b';
    else {
      for (int k = 0; k < m; k++) str[j][t + k] = 'a';
      zh[i][j] -= m;
      zh[j][i] -= m;
    }
  }
  t += m;
}
void solve(int i, int m) {
  if (m < 0) los();
  for (int j = 0; j < 4; j++) {
    if (j == 0 || j == i)
      for (int k = 0; k < m; k++) str[j][t + k] = 'b';
    else
      for (int k = 0; k < m; k++) str[j][t + k] = 'a';
  }
  t += m;
}
int main() {
  for (int i = 0; i <= 2; i++)
    for (int j = i + 1; j <= 3; j++) {
      cin >> zh[i][j];
      zh[j][i] = zh[i][j];
      zhu[i] += zh[i][j];
      zhu[j] += zh[i][j];
    }
  int res = zhu[0];
  for (int i = 0; i < 4; i++) res = min(res, zhu[i]);
  for (int i = 0; i < 4; i++) {
    if ((zhu[i] & 1) != (res & 1)) los();
    sing(i, (zhu[i] - res) / 2);
  }
  int as = zh[0][1] + zh[0][2] + zh[0][3];
  if (as & 1) los();
  solve(3, (zh[0][1] + zh[0][2] - zh[0][3]) / 2);
  solve(2, (zh[0][1] + zh[0][3] - zh[0][2]) / 2);
  solve(1, (zh[0][3] + zh[0][2] - zh[0][1]) / 2);
  cout << t << endl;
  for (int i = 0; i < 4; i++) {
    str[i][t] = 0;
    cout << str[i] << endl;
  }
  return 0;
}
