#include <bits/stdc++.h>
using namespace std;
int a, b, c, d, e, f;
int t, u, v, w, x, y, z;
string s1, s2, s3, s4;
int mi = 1000000007;
int fun(int i) {
  if (i % 2) {
    cout << -1 << endl;
    exit(0);
  }
  i /= 2;
  mi = min(mi, i);
  return i;
}
void func(string s, int k) {
  for (int i = 0; i < k; i++) {
    s1 += s[0];
    s2 += s[1];
    s3 += s[2];
    s4 += s[3];
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> a >> b >> c >> d >> e >> f;
  u = fun(b - c + d - e);
  v = fun(-a + c + e);
  w = fun(a - c + d - f);
  x = fun(-b + c + f);
  y = fun(-d + e + f);
  z = fun(a + b - e - f);
  if (mi < 0) {
    t = -mi;
    u += t;
    v -= t;
    w += t;
    x -= t;
    y -= t;
    z += t;
    if (u < 0 || v < 0 || w < 0 || x < 0 || y < 0 || z < 0) {
      cout << -1 << endl;
      return 0;
    }
  } else {
    t = 0;
  }
  func("aaab", t);
  func("aaba", u);
  func("aabb", v);
  func("abaa", w);
  func("abab", x);
  func("abba", y);
  func("abbb", z);
  cout << s1.size() << endl;
  cout << s1 << endl;
  cout << s2 << endl;
  cout << s3 << endl;
  cout << s4 << endl;
  return 0;
}
