#include <bits/stdc++.h>
using namespace std;
int a, b, c, d;
int f[51][51] = {0};
struct num {
  int x;
  int no;
  bool operator<(const num &b) const { return x < b.x; }
} n[4];
int main(int argc, const char *argv[]) {
  for (int i = 0; i < 4; i++) {
    cin >> n[i].x;
    n[i].no = i;
  }
  sort(n, n + 4);
  int need[4];
  int now = 1;
  int x, y;
  for (int i = 0; i < 4; i++) need[i] = n[i].x;
  x = 0;
  y = 1;
  while (need[0] > 1) {
    while (need[now] == 0) {
      now++;
      if (now == 4) now = 1;
    }
    need[now]--;
    f[x++][y] = now;
    if (y == 0) need[0]--;
    y = 1 - y;
    if (x == 50) break;
  }
  x = 1;
  y = 2;
  while (need[0] > 1) {
    while (need[now] == 0) {
      now++;
      if (now == 4) now = 1;
    }
    need[now]--;
    f[x++][y] = now;
    x++;
    need[0]--;
    if (x >= 48) break;
  }
  x = 2;
  y = 3;
  while (need[0] > 1) {
    while (need[now] == 0) {
      now++;
      if (now == 4) now = 1;
    }
    need[now]--;
    f[x++][y] = now;
    x++;
    need[0]--;
    if (x >= 47) break;
  }
  x = 3;
  y = 4;
  while (need[0] > 1) {
    while (need[now] == 0) {
      now++;
      if (now == 4) now = 1;
    }
    need[now]--;
    f[x++][y] = now;
    x++;
    need[0]--;
    if (x >= 46) break;
  }
  x = 4;
  y = 5;
  while (need[0] > 1) {
    while (need[now] == 0) {
      now++;
      if (now == 4) now = 1;
    }
    need[now]--;
    f[x++][y] = now;
    x++;
    need[0]--;
    if (x >= 45) break;
  }
  for (y = 10; y < 46; y += 2) {
    x = 0;
    while (need[1] || need[2] || need[3]) {
      while (need[now] == 0) {
        now++;
        if (now == 4) now = 1;
      }
      need[now]--;
      f[x++][y] = now;
      x++;
      if (x == 50) break;
    }
  }
  cout << "50 50" << endl;
  for (int i = 0; i < 50; i++) {
    for (int j = 0; j < 50; j++) {
      cout << (char)(n[f[i][j]].no + 'A');
    }
    cout << endl;
  }
  return 0;
}
