#include <bits/stdc++.h>
using namespace std;
int x[8], a[7], key, buff, sum = 1000000007, h[8];
string ham[4],
    str[] = {"", "abbb", "aabb", "abab", "abaa", "aaab", "aaba", "abba"};
bool flag;
int main() {
  for (int i = 0; i < 6; i++) cin >> a[i];
  if ((a[5] - a[2] + a[1]) % 2 != 0) {
    cout << -1;
    return 0;
  }
  key = (a[5] - a[2] + a[1]) / 2;
  if (key < 0) {
    cout << -1;
    return 0;
  }
  for (x[6] = 0; x[6] <= key; x[6]++) {
    flag = 0;
    x[7] = key - x[6];
    buff = a[2] - a[1] + x[6] + x[7];
    if (buff < 0) {
      flag = 1;
      continue;
    }
    if ((a[1] - a[0] + a[3] - 2 * x[6]) % 2 != 0) {
      flag = 1;
      continue;
    }
    x[2] = (a[1] - a[0] + a[3] - 2 * x[6]) / 2;
    if (x[2] < 0) {
      flag = 1;
      continue;
    }
    x[1] = a[2] - x[2] - buff;
    if (x[1] < 0) {
      flag = 1;
      continue;
    }
    if ((a[0] + a[4] - x[1] - x[2] - buff - 2 * x[7]) % 2 != 0) {
      flag = 1;
      continue;
    }
    x[4] = (a[0] + a[4] - x[1] - x[2] - buff - 2 * x[7]) / 2;
    if (x[4] < 0) {
      flag = 1;
      continue;
    }
    x[5] = a[4] - x[2] - x[4] - x[7];
    if (x[5] < 0) {
      flag = 1;
      continue;
    }
    x[3] = buff - x[5];
    if (x[3] < 0) {
      flag = 1;
      continue;
    }
    if (!flag && (x[1] + x[2] + x[3] + x[4] + x[5] + x[6] + x[7]) < sum) {
      sum = (x[1] + x[2] + x[3] + x[4] + x[5] + x[6] + x[7]);
      for (int j = 1; j <= 7; j++) h[j] = x[j];
    }
  }
  if (sum == 1000000007) {
    cout << -1;
    return 0;
  }
  cout << sum << endl;
  for (int j = 1; j <= 7; j++) {
    for (int k = 0; k < h[j]; k++) {
      for (int i = 0; i < 4; i++) {
        ham[i] += str[j][i];
      }
    }
  }
  for (int i = 0; i < 4; i++) cout << ham[i] << endl;
  return 0;
}
