#include <bits/stdc++.h>
using namespace std;
struct v {
  int i;
  char a;
};
bool comp(v a, v b) { return (a.i < b.i); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  char a[50][50];
  v b[4];
  int i, j, k = 0, l = 0, m, n;
  cin >> b[0].i >> b[1].i >> b[2].i >> b[3].i;
  b[0].a = 'A';
  b[1].a = 'B';
  b[2].a = 'C';
  b[3].a = 'D';
  sort(b, b + 4, comp);
  for (i = 4; i < 50; i += 5)
    for (j = 0; j < 50; j++) a[i][j] = b[0].a;
  for (i = 4; i < 50; i += 5)
    for (j = 0; j < 50; j++) a[j][i] = b[0].a;
  b[0].i--;
  if (b[0].i == 0) k++;
  while (l < 100) {
    i = 5 * (l / 10);
    j = 5 * (l % 10);
    if (k == 0) {
      a[i + 1][j + 1] = b[0].a;
      a[i + 1][j + 2] = b[0].a;
      a[i + 2][j + 1] = b[0].a;
      a[i + 2][j + 2] = b[0].a;
      a[i][j] = b[3].a;
      a[i][j + 1] = b[3].a;
      a[i + 1][j] = b[3].a;
      a[i + 2][j] = b[3].a;
      a[i + 3][j] = b[2].a;
      a[i + 3][j + 1] = b[2].a;
      a[i + 3][j + 2] = b[2].a;
      a[i + 3][j + 3] = b[2].a;
      a[i][j + 2] = b[1].a;
      a[i][j + 3] = b[1].a;
      a[i + 1][j + 3] = b[1].a;
      a[i + 2][j + 3] = b[1].a;
      b[0].i--;
      b[1].i--;
      b[2].i--;
      b[3].i--;
      while (k < 4 && b[k].i == 0) k++;
    } else if (k == 1) {
      for (n = 0; n < 2; n++)
        for (m = 0; m < 4; m++) a[i + n][j + m] = b[3].a;
      for (m = 0; m < 4; m++) a[i + 2][j + m] = b[2].a;
      for (m = 0; m < 4; m++) a[i + 3][j + m] = b[1].a;
      b[1].i--;
      b[2].i--;
      b[3].i--;
      while (k < 4 && b[k].i == 0) k++;
    } else if (k == 2) {
      for (n = 0; n < 2; n++)
        for (m = 0; m < 4; m++) a[i + n][j + m] = b[3].a;
      for (n = 2; n < 4; n++)
        for (m = 0; m < 4; m++) a[i + n][j + m] = b[2].a;
      b[2].i--;
      b[3].i--;
      while (k < 4 && b[k].i == 0) k++;
    } else if (k == 3) {
      for (n = 0; n < 4; n++)
        for (m = 0; m < 4; m++) a[i + n][j + m] = b[3].a;
      b[3].i--;
      while (k < 4 && b[k].i == 0) k++;
    } else {
      for (n = 0; n < 4; n++)
        for (m = 0; m < 4; m++) a[i + n][j + m] = b[0].a;
    }
    l++;
  }
  cout << "50 50\n";
  for (i = 0; i < 50; i++) {
    for (j = 0; j < 50; j++) cout << a[i][j];
    cout << "\n";
  }
  return 0;
}
