#include <bits/stdc++.h>
using namespace std;
vector<vector<char> > ans(50, vector<char>(50, 'Q'));
bool hasEqualNeighbour(int i, int j, char c) {
  if (i > 0 && ans[i - 1][j] == c) {
    return true;
  }
  if (i < 49 && ans[i + 1][j] == c) {
    return true;
  }
  if (j > 0 && ans[i][j - 1] == c) {
    return true;
  }
  if (j < 49 && ans[i][j + 1] == c) {
    return true;
  }
  return false;
}
int main(int argc, char** argv) {
  vector<int> colors(4);
  for (int i = 0; i < 4; ++i) {
    cin >> colors[i];
    --colors[i];
  }
  vector<vector<int> > vacant;
  vector<char> vc;
  for (int i = 0; i < 50; ++i) {
    for (int j = 0; j < 50; ++j) {
      if (i < 25 && j < 25) {
        ans[i][j] = 'A';
        if (i % 2 == 1 && j % 2 == 1) {
          vacant.push_back({i, j});
          vc.push_back(ans[i][j]);
        }
      }
      if (i >= 25 && j < 25) {
        ans[i][j] = 'B';
        if (i % 2 == 0 && j % 2 == 1) {
          vacant.push_back({i, j});
          vc.push_back(ans[i][j]);
        }
      }
      if (i < 25 && j >= 25) {
        ans[i][j] = 'C';
        if (i % 2 == 1 && j % 2 == 0) {
          vacant.push_back({i, j});
          vc.push_back(ans[i][j]);
        }
      }
      if (i >= 25 && j >= 25) {
        ans[i][j] = 'D';
        if (i % 2 == 0 && j % 2 == 0) {
          vacant.push_back({i, j});
          vc.push_back(ans[i][j]);
        }
      }
    }
  }
  vector<bool> used(vacant.size(), false);
  for (int c = 0; c < 4; ++c) {
    while (colors[c] > 0) {
      for (int i = 0; i < vacant.size(); ++i) {
        if (!used[i] && vc[i] != 'A' + c) {
          int x = vacant[i][0];
          int y = vacant[i][1];
          ans[x][y] = 'A' + c;
          used[i] = true;
          --colors[c];
          break;
        }
      }
    }
  }
  cout << ans.size() << " " << ans[0].size() << "\n";
  for (int i = 0; i < ans.size(); ++i) {
    for (int j = 0; j < ans[i].size(); ++j) {
      cout << ans[i][j];
    }
    cout << "\n";
  }
  return 0;
}
