#include <bits/stdc++.h>
using namespace std;
const int MAXN = (5);
const long double eps = 1e-12;
vector<long double> gauss(vector<vector<long double>> &a) {
  int n = a.size(), m = a[0].size() - 1;
  vector<int> where(m, -1);
  for (int col = 0, row = 0; col < m && row < n; col++) {
    int sel = row;
    for (int i = row; i < n; i++)
      if (abs(a[i][col]) > abs(a[sel][col])) sel = i;
    if (abs(a[sel][col]) < eps) {
      where[col] = -1;
      continue;
    }
    for (int i = col; i <= m; i++) swap(a[sel][i], a[row][i]);
    where[col] = row;
    for (int i = 0; i < n; i++)
      if (i != row) {
        if (abs(a[i][col]) < eps) continue;
        long double c = a[i][col] / a[row][col];
        for (int j = 0; j <= m; j++) a[i][j] -= c * a[row][j];
      }
    row++;
  }
  vector<long double> ans(m, 0);
  for (int i = 0; i < m; i++)
    if (where[i] != -1) ans[i] = a[where[i]][m] / a[where[i]][i];
  for (int i = 0; i < n; i++) {
    long double sum = a[i][m];
    for (int j = 0; j < m; j++) sum -= ans[j] * a[i][j];
    if (abs(sum) > eps) return vector<long double>();
  }
  return ans;
}
int D[MAXN][MAXN];
void read() {
  for (int i = 2; i <= 4; i++) {
    cin >> D[1][i];
    D[i][1] = D[1][i];
  }
  for (int i = 3; i <= 4; i++) {
    cin >> D[2][i];
    D[i][2] = D[2][i];
  }
  for (int i = 4; i <= 4; i++) {
    cin >> D[3][i];
    D[i][3] = D[3][i];
  }
}
string str[MAXN];
string correspond[4] = {"aaabaab", "aabaaba", "abaabbb", "baaabaa"};
void init_matrix(vector<vector<long double>> &main) {
  main[0][0] = 0;
  main[0][1] = 0;
  main[0][2] = 1;
  main[0][3] = 1;
  main[0][4] = 0;
  main[0][5] = 1;
  main[0][6] = D[1][2];
  main[1][0] = 0;
  main[1][1] = 1;
  main[1][2] = 0;
  main[1][3] = 1;
  main[1][4] = 1;
  main[1][5] = 1;
  main[1][6] = D[1][3];
  main[2][0] = 1;
  main[2][1] = 0;
  main[2][2] = 0;
  main[2][3] = 1;
  main[2][4] = 1;
  main[2][5] = 0;
  main[2][6] = D[1][4];
  main[3][0] = 0;
  main[3][1] = 1;
  main[3][2] = 1;
  main[3][3] = 0;
  main[3][4] = 1;
  main[3][5] = 0;
  main[3][6] = D[2][3];
  main[4][0] = 1;
  main[4][1] = 0;
  main[4][2] = 1;
  main[4][3] = 0;
  main[4][4] = 1;
  main[4][5] = 1;
  main[4][6] = D[2][4];
  main[5][0] = 1;
  main[5][1] = 1;
  main[5][2] = 0;
  main[5][3] = 0;
  main[5][4] = 0;
  main[5][5] = 1;
  main[5][6] = D[3][4];
}
void solve() {
  vector<vector<long double>> main(6, vector<long double>(7, 0));
  init_matrix(main);
  int mn_found = -1, found = -1;
  for (int val6 = 0; val6 <= 100000; val6++) {
    if (main[0][6] < -eps || main[2][6] < -eps || main[3][6] < -eps ||
        main[5][6] < -eps)
      break;
    vector<vector<long double>> a = main;
    vector<long double> res = gauss(a);
    if (res.size() != 0) {
      int cnt = val6, stop = false;
      for (long double x : res) {
        cnt += (int)(x);
        if (x < -eps || (x - (int)x) > eps) {
          stop = true;
          break;
        }
      }
      if (!stop && (found == -1 || cnt < mn_found))
        found = val6, mn_found = cnt;
    }
    main[0][6]--;
    main[2][6]--;
    main[3][6]--;
    main[5][6]--;
  }
  if (found == -1) {
    cout << -1 << '\n';
    return;
  }
  init_matrix(main);
  main[0][6] -= found;
  main[2][6] -= found;
  main[3][6] -= found;
  main[5][6] -= found;
  vector<long double> res = gauss(main);
  for (int i = 0; i < res.size(); i++)
    for (int tm = 0; tm < (int)(res[i]); tm++)
      for (int ns = 0; ns < 4; ns++) str[ns] += correspond[ns][i];
  for (int ns = 0; ns < 4; ns++)
    for (int tm = 0; tm < found; tm++) str[ns] += correspond[ns][6];
  cout << mn_found << '\n';
  for (int i = 0; i < 4; i++) cout << str[i] << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  read();
  solve();
  return 0;
}
