#include <bits/stdc++.h>
using namespace std;
int n, m, cnt[4];
string ans[500];
vector<pair<int, int> > v(4);
int main() {
  for (int i = 0; i < 4; i++) cin >> v[i].first, v[i].second = i;
  sort(v.begin(), v.end());
  int now = 0;
  while (v[3].first--) {
    ans[n] += char(v[3].second + 'A');
    if (v[2].first) ans[n] += char(v[2].second + 'A'), v[2].first--;
    if (v[1].first > 1) ans[n] += char(v[1].second + 'A'), v[1].first--;
    ans[n] += char(v[0].second + 'A');
    if (ans[n].size() >= 46) {
      m = max(m, int(ans[n].size()));
      n++;
      ans[n].resize(m, char(v[0].second + 'A'));
      n++;
    }
  }
  m = max(m, int(ans[n].size()));
  n++;
  ans[n].resize(m, char(v[0].second + 'A'));
  n++;
  ans[n].resize(m, char(v[1].second + 'A'));
  if (v[0].first > 1) {
    n++;
    v[0].first--;
    while (v[0].first--) {
      ans[n] += char(v[0].second + 'A');
      if (ans[n].size() < m) ans[n] += char(v[1].second + 'A');
      if (ans[n].size() == m) {
        n++;
        ans[n].resize(m, char(v[1].second + 'A'));
        n++;
      }
    }
  }
  if (!ans[n].empty()) n++;
  cout << n << " " << m << endl;
  for (int i = 0; i < n; i++) {
    while (ans[i].size() < m) ans[i] += ans[i][int(ans[i].size() - 1)];
    cout << ans[i] << endl;
  }
  return 0;
}
