#include <bits/stdc++.h>
using namespace std;
string mat[55];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cin.tie(0), cout.tie(0),
      cout.precision(15);
  int a, b, c, d;
  for (int i = int(0); i < int(50); i++) {
    for (int j = int(0); j < int(50); j++) {
      mat[i] += " ";
    }
  }
  while (cin >> a >> b >> c >> d) {
    pair<int, char> arr[] = {pair<int, char>(a, 'A'), pair<int, char>(b, 'B'),
                             pair<int, char>(c, 'C'), pair<int, char>(d, 'D')};
    sort(arr, arr + 4);
    for (int i = int(0); i < int(50); i++) {
      for (int j = int(0); j < int(50); j++) {
        mat[i][j] = arr[0].second;
      }
    }
    int x = 0;
    if (arr[0].first != 1) {
      bool v = 1;
      int w = 1;
      arr[1].first--;
      for (int i = 0; v && i < 50; i += 2) {
        for (int j = 0; v && j < 50; j += 2) {
          mat[i][j + 1] = arr[1].second;
          mat[i + 1][j] = arr[1].second;
          mat[i + 1][j + 1] = arr[1].second;
          arr[0].first--;
          if (arr[0].first == 2) {
            x = i + 3;
            v = 0;
          }
        }
        if (!v) break;
      }
      arr[1].first--;
      arr[0].first--;
      for (int i = int(0); i < int(50); i++) {
        mat[x][i] = arr[1].second;
      }
    }
    x += 2;
    for (int i = x, k = 1; k < 4 && i < 50; i += 2) {
      for (int j = 0; k < 4 && j < 50; j += 2) {
        while (k < 4 && arr[k].first == 0) k++;
        if (k == 4) continue;
        arr[k].first--;
        mat[i][j] = arr[k].second;
      }
    }
    cout << "50 50" << endl;
    for (int i = int(0); i < int(50); i++) {
      for (int j = int(0); j < int(50); j++) {
        cout << mat[i][j];
      }
      cout << endl;
    }
  }
  return 0;
}
