#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-7;
vector<double> ans;
int gauss(vector<vector<double> > a) {
  int n = (int)a.size();
  int m = (int)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) 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) {
        double c = a[i][col] / a[row][col];
        for (int j = col; j <= m; ++j) a[i][j] -= a[row][j] * c;
      }
    ++row;
  }
  ans.assign(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) {
    double sum = 0;
    for (int j = 0; j < m; ++j) sum += ans[j] * a[i][j];
    if (abs(sum - a[i][m]) > EPS) return 0;
  }
  for (int i = 0; i < m; ++i)
    if (where[i] == -1) return (2000000000);
  return 1;
}
bool corr(vector<vector<double> > A, vector<int> res) {
  for (int i = (0); i < (7); ++i) {
    int t = 0;
    for (int j = (0); j < (7); ++j) t += (int(A[i][j])) * res[j];
    if (t != (int(A[i][7]))) return false;
  }
  for (int i = (0); i < (7); ++i)
    if (res[i] < 0) return false;
  return true;
}
int main() {
  vector<vector<double> > A(7, vector<double>(8, 0));
  for (int i = (0); i < (6); ++i) cin >> A[i][7];
  for (int i = (0); i < (7); ++i) A[6][i] = 1;
  int R[3][4] = {-1, 0, 1, 2, -1, -1, 3, 4, -1, -1, -1, 5};
  for (int mask = (1); mask < (8); ++mask) {
    for (int i = (0); i < (3); ++i) {
      for (int j = (i + 1); j < (4); ++j) {
        if (((1 << i) & (mask)) == 0 && 0 != ((1 << j) & (mask)) ||
            (((1 << i) & (mask)) != 0 && 0 == ((1 << j) & (mask)))) {
          A[R[i][j]][mask - 1] = 1;
        }
      }
    }
  }
  for (int z = (1); z < (300000); ++z) {
    A[6][7] = z;
    if (gauss(A) != 1) {
      continue;
    }
    vector<int> res(7);
    for (int i = (0); i < (7); ++i) {
      res[i] = (int)(ans[i] + 0.5);
    }
    if (!corr(A, res)) continue;
    string s[4];
    for (int i = (0); i < (7); ++i) {
      for (int j = (0); j < (res[i]); ++j) {
        for (int k = (0); k < (4); ++k) {
          if (((i + 1) & (1 << k)))
            s[k].push_back('a');
          else
            s[k].push_back('b');
        }
      }
    }
    cout << z << endl;
    for (int i = (0); i < (4); ++i) {
      cout << s[i] << endl;
    }
    return 0;
  }
  cout << "-1\n";
  return 0;
}
