#include <bits/stdc++.h>
using namespace std;
double M[6][7];
int N = 6;
bool solve() {
  int r = 0;
  for (int i = 0; i < N; ++i) {
    int k = -1;
    for (int j = r; j < N; ++j) {
      if (abs(M[j][i]) > 1e-7) {
        k = j;
        break;
      }
    }
    if (k != -1) {
      for (int j = 0; j <= N; ++j) swap(M[r][j], M[k][j]);
      double x = M[r][i];
      for (int j = 0; j <= N; ++j) M[r][j] /= x;
      for (int j = r + 1; j < N; ++j) {
        double y = M[j][i] / x;
        for (int c = i; c <= N; ++c) M[j][c] -= y * M[r][c];
      }
      ++r;
    }
  }
  for (int i = N - 1; i >= 0; --i) {
    for (int j = 0; j < i; ++j) {
      double x = M[j][i] / M[i][i];
      M[j][i] = 0;
      M[j][N] -= x * M[i][N];
    }
  }
  for (int i = 0; i < N; ++i) {
    if (abs(round(M[i][N]) - M[i][N]) > 1e-7) return false;
    if (M[i][N] < -1e-7) return false;
  }
  return true;
}
int main() {
  ios::sync_with_stdio(0);
  int h[6];
  for (int i = 0; i < 6; ++i) cin >> h[i];
  int max_val = min(h[0], min(h[1], h[2]));
  bool done = false;
  string s[] = {"aaaaaaa", "aaabbbb", "abbaabb", "bababab"};
  for (int it = 0; it <= max_val; ++it) {
    for (int i = 0; i < 6; ++i) {
      int pos = 0;
      int x = i + 1, b1, b2;
      for (int j = 3; j > 0; --j) {
        if (x & (1 << j))
          b1 = 1;
        else
          b1 = 0;
        for (int k = j - 1; k >= 0; --k) {
          if (x & (1 << k))
            b2 = 1;
          else
            b2 = 0;
          M[pos++][i] = b1 ^ b2;
        }
      }
    }
    for (int i = 0; i < 6; ++i) M[i][6] = h[i];
    --h[0];
    --h[1];
    --h[2];
    if (solve()) {
      done = true;
      int L = it;
      string a, b, c, d;
      for (int i = 0; i < 6; ++i) {
        int x = (int)round(M[i][N]);
        L += x;
        for (int j = 0; j < x; ++j) {
          a += s[0][i];
          b += s[1][i];
          c += s[2][i];
          d += s[3][i];
        }
      }
      for (int i = 0; i < it; ++i) {
        a += s[0][6];
        b += s[1][6];
        c += s[2][6];
        d += s[3][6];
      }
      cout << L << '\n' << a << '\n' << b << '\n' << c << '\n' << d << '\n';
      break;
    }
  }
  if (!done) cout << -1 << '\n';
  return 0;
}
