#include <bits/stdc++.h>
using namespace std;
std::mt19937 rng(
    (int)std::chrono::steady_clock::now().time_since_epoch().count());
const int MOD = 1e9 + 7;
template <class T>
T fexp(T x, long long e) {
  T ans(1);
  for (; e > 0; e /= 2) {
    if (e & 1) ans = ans * x;
    x = x * x;
  }
  return ans;
}
template <int mod = MOD>
struct modBase {
  modBase(int v = 0) : val((v % mod + mod) % mod) {}
  int val;
  modBase<mod> operator*(modBase<mod> o) {
    return (long long)val * o.val % mod;
  }
  modBase<mod> operator/(modBase<mod> o) { return *this * fexp(o, mod - 2); }
  modBase<mod> operator+(modBase<mod> o) {
    return val + o.val >= mod ? val + o.val - mod : val + o.val;
  }
  modBase<mod> operator-(modBase<mod> o) {
    return val - o.val < 0 ? val - o.val + mod : val - o.val;
  }
};
template <int mod = MOD>
void gaussianElimination(std::vector<std::vector<modBase<mod>>> &a) {
  int n = (int)a.size();
  int m = (int)a[0].size();
  int c = 0;
  for (int i = 0; i < m; i++) {
    bool valid = false;
    for (int ii = c; ii < n; ii++) {
      if (a[ii][i].val != 0) {
        std::swap(a[ii], a[c++]);
        valid = true;
        break;
      }
    }
    if (!valid) {
      continue;
    }
    modBase<mod> l = modBase<mod>(1) / a[c - 1][i];
    for (int j = 0; j < m; j++) {
      a[c - 1][j] = a[c - 1][j] * l;
    }
    for (int ii = 0; ii < n; ii++) {
      if (ii != c - 1) {
        l = a[ii][i];
        for (int j = 0; j < m; j++) {
          a[ii][j] = a[ii][j] - a[c - 1][j] * l;
        }
      }
    }
  }
}
int vals[4][4];
int flatten[4][4];
vector<int> corr[7];
string corrString[7];
int main() {
  if (fopen("FILENAME.in", "r")) {
    freopen("FILENAME.in", "r", stdin);
    freopen("FILENAME.out", "w", stdout);
  }
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n = 4;
  vector<int> desiredResult(6, 0);
  int counter = 0;
  for (int i = 0; i < 3; i++) {
    for (int j = i + 1; j < n; j++) {
      cin >> vals[i][j];
      desiredResult[counter] = vals[i][j];
      flatten[i][j] = counter++;
    }
  }
  map<vector<int>, string> options;
  for (int i = 1; i < (1 << n) - 1; i++) {
    vector<int> gen;
    for (int j = 0; j < n; j++) {
      if (i & (1 << j)) {
        gen.push_back(1);
      } else {
        gen.push_back(0);
      }
    }
    vector<int> diffs(6, 0);
    for (int j = 0; j < n; j++) {
      for (int k = j + 1; k < n; k++) {
        diffs[flatten[j][k]] += (gen[j] != gen[k]);
      }
    }
    string cs = "";
    for (int j : gen) {
      cs += (j == 1 ? 'b' : 'a');
    }
    options[diffs] = cs;
  }
  counter = 0;
  for (pair<vector<int>, string> p : options) {
    corr[counter] = p.first;
    corrString[counter++] = p.second;
  }
  bool solved = false;
  vector<int> ansVect;
  for (int j = 0; j <= 100000; j++) {
    vector<int> thisDesiredResult = desiredResult;
    bool shouldBreak = false;
    for (int k = 0; k < 6; k++) {
      thisDesiredResult[k] -= j * corr[0][k];
      if (thisDesiredResult[k] < 0) {
        shouldBreak = true;
        break;
      }
    }
    if (shouldBreak) break;
    vector<vector<modBase<>>> matrix(6, vector<modBase<>>(7, 0));
    int rowCounter = 0;
    for (int k = 1; k < 7; k++) {
      for (int l = 0; l < 6; l++) {
        matrix[l][rowCounter] = corr[k][l];
      }
      rowCounter++;
    }
    for (int k = 0; k < 6; k++) {
      matrix[k][6] = thisDesiredResult[k];
    }
    gaussianElimination(matrix);
    bool worked = true;
    vector<int> countAns(7, 0);
    countAns[0] = j;
    for (int k = 0; k < 6; k++) {
      if (matrix[k][k].val == 1 && matrix[k][6].val <= 100000) {
        countAns[k + 1] = matrix[k][6].val;
      } else {
        worked = false;
      }
    }
    if (worked) {
      solved = true;
      ansVect = countAns;
      break;
    }
  }
  if (solved) {
    int totalLength = 0;
    for (int i = 0; i < 7; i++) {
      totalLength += ansVect[i];
    }
    vector<vector<char>> printVectors(4, vector<char>(totalLength, ' '));
    counter = 0;
    for (int i = 0; i < 7; i++) {
      for (int j = 0; j < ansVect[i]; j++) {
        for (int k = 0; k < 4; k++) {
          printVectors[k][counter] = corrString[i][k];
        }
        counter++;
      }
    }
    cout << totalLength << endl;
    for (int i = 0; i < 4; i++) {
      for (int j = 0; j < totalLength; j++) {
        cout << printVectors[i][j];
      }
      cout << endl;
    }
  } else {
    cout << -1 << endl;
  }
}
