#include <bits/stdc++.h>
using namespace std;
inline int inn() {
  int x, ch;
  while ((ch = getchar()) < '0' || ch > '9')
    ;
  x = ch ^ '0';
  while ((ch = getchar()) >= '0' && ch <= '9')
    x = (x << 1) + (x << 3) + (ch ^ '0');
  return x;
}
inline int show(int len, char c) {
  for (int i = 1; i <= len; i++) printf("%c", c);
  return 0;
}
inline int hhh() { return !printf("\n"); }
inline int show_it(int x, int p, int p2, int u, int v, int w, int t) {
  printf("%d\n", x + p2 + t);
  show(x + p2 + t, 'a'), hhh();
  show(x, 'b'), show(p2 + t, 'a'), hhh();
  show(p, 'a'), show(x - p, 'b'), show(p2, 'b'), show(t, 'a'), hhh();
  show(u, 'a'), show(p - u, 'b'), show(v, 'a'), show(x - p - v, 'b'),
      show(w, 'a'), show(p2 - w, 'b'), show(t, 'b'), hhh();
  return 0;
}
int ax, ap, ap2, au, av, aw, a_t;
int main() {
  int x = inn(), y = inn(), m = inn(), z = inn(), n = inn(), q = inn();
  if ((y + z - x) & 1) return !printf("-1\n");
  int p2 = (y + z - x) >> 1, p = (z - y + x) >> 1;
  if (p2 < 0 || p < 0 || p > x) return !printf("-1\n");
  int A = m - p2 - x, B = n - p2, C = q - p;
  if ((B + C) & 1) return !printf("-1\n");
  int ans = 1000000000;
  for (int v = 0, t; v <= min((B + C) / 2, x - p); v++)
    if ((t = (B + C) / 2 - v) >= 0) {
      int D = A + v - t, E = B - v - t, u, w;
      if ((E - D) & 1)
        continue;
      else
        u = (E - D) / 2;
      if (u < 0 || u > p)
        continue;
      else
        w = u - E;
      if (w < 0 || w > p2)
        continue;
      else if (x + p2 + t < ans)
        ans = x + p2 + t, ax = x, ap = p, ap2 = p2, au = u, av = v, aw = w,
        a_t = t;
    }
  if (ans < 1000000000)
    return show_it(ax, ap, ap2, au, av, aw, a_t);
  else
    return !printf("-1\n");
}
