#include <bits/stdc++.h>
using namespace std;
int a, b, c, x, y, z;
int abx, bcy, acz;
int r;
int main() {
  cin >> a >> b >> c;
  cin >> abx >> acz >> bcy;
  bool ok = 1;
  if (abx > a + b || (abx + a + b) % 2)
    ok = 0;
  else if (acz > a + c || (acz + a + c) % 2)
    ok = 0;
  else if (bcy > b + c || (bcy + b + c) % 2)
    ok = 0;
  else {
    x = (a + b - abx) / 2;
    y = (b + c - bcy) / 2;
    z = (a + c - acz) / 2;
    int mn = min(x, min(y, z));
    int mx = max(x + z - a, max(x + y - b, y + z - c));
    mx = max(mx, 0);
    if (mx > mn) ok = 0;
    r = mx;
  }
  if (ok == 0)
    cout << -1 << endl;
  else {
    int len = a + b + c - x - y - z + r;
    cout << a + b + c - x - y - z + r << endl;
    vector<int> v[7];
    int t = 0;
    for (int i = 0; i < x - r; i++) v[0].push_back(t++);
    for (int i = 0; i < y - r; i++) v[1].push_back(t++);
    for (int i = 0; i < z - r; i++) v[2].push_back(t++);
    for (int i = 0; i < a - x - z + r; i++) v[3].push_back(t++);
    for (int i = 0; i < b - x - y + r; i++) v[4].push_back(t++);
    for (int i = 0; i < c - y - z + r; i++) v[5].push_back(t++);
    for (int i = 0; i < r; i++) v[6].push_back(t++);
    string s[4];
    for (int i = 0; i < 4; i++) s[i] = string(len, 'a');
    for (int i = 0; i < v[0].size(); i++) s[1][v[0][i]] = 'b';
    for (int i = 0; i < v[2].size(); i++) s[1][v[2][i]] = 'b';
    for (int i = 0; i < v[3].size(); i++) s[1][v[3][i]] = 'b';
    for (int i = 0; i < v[6].size(); i++) s[1][v[6][i]] = 'b';
    for (int i = 0; i < v[0].size(); i++) s[2][v[0][i]] = 'b';
    for (int i = 0; i < v[1].size(); i++) s[2][v[1][i]] = 'b';
    for (int i = 0; i < v[4].size(); i++) s[2][v[4][i]] = 'b';
    for (int i = 0; i < v[6].size(); i++) s[2][v[6][i]] = 'b';
    for (int i = 0; i < v[1].size(); i++) s[3][v[1][i]] = 'b';
    for (int i = 0; i < v[2].size(); i++) s[3][v[2][i]] = 'b';
    for (int i = 0; i < v[5].size(); i++) s[3][v[5][i]] = 'b';
    for (int i = 0; i < v[6].size(); i++) s[3][v[6][i]] = 'b';
    for (int i = 0; i < 4; i++) cout << s[i] << endl;
  }
}
