#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
bool np(int x) {
  if (x >= 0) return x % 2;
  return -x % 2;
}
int main() {
  ios_base::sync_with_stdio(0);
  vector<int> h(6);
  for (int i = 0; i < 6; ++i) cin >> h[i];
  if (np(h[2] + h[3] - h[1] - h[4]) || np(h[3] - h[5] - h[4])) {
    cout << "-1";
    return 0;
  }
  vector<int> H(6);
  H[0] = h[0] - h[3] + h[1];
  H[1] = (h[2] + h[3] - h[1] - h[4]) / 2;
  H[2] = h[4] - h[2];
  H[3] = (h[3] - h[5] - h[4] + 2 * h[2]) / 2;
  H[4] = h[5] - h[4];
  H[5] = h[5];
  if (H[0] % 2 == 1) {
    cout << "-1";
    return 0;
  }
  vector<int> il(7), odpIl;
  int S = INF;
  for (int i = 0; i <= 100000; ++i) {
    il[6] = i;
    il[5] = (H[0] - 2 * il[6]) / 2;
    il[4] = H[1] + il[5];
    il[3] = H[3] - il[6] + il[5] - il[4];
    il[2] = H[2] + il[6] - il[5] + il[4];
    il[1] = H[4] - il[4] + il[3] + il[2];
    il[0] = H[5] - il[5] - il[4] - il[1];
    bool ok = true;
    int s = 0;
    for (int j = 0; j < 7; ++j) {
      if (il[j] < 0) ok = false;
      s += il[j];
    }
    if (!ok) continue;
    if (s < S) {
      S = s;
      odpIl = il;
    }
  }
  if (S == INF) {
    cout << "-1";
    return 0;
  }
  cout << S << endl;
  string s[7] = {"aaab", "aaba", "abaa", "aabb", "abab", "abba", "abbb"};
  vector<string> odp(4, "");
  for (int i = 0; i < 7; ++i)
    for (int j = 0; j < odpIl[i]; ++j)
      for (int k = 0; k < 4; ++k) odp[k] += s[i][k];
  for (int i = 0; i < 4; ++i) cout << odp[i] << endl;
  return 0;
}
