#include #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using pii = pair; int main() { int k; cin >> k; vector> q(4); rep(i, 5) q[i % 4].push('A' + i); rep(i, k) { char c = q[i % 4].front(); q[i % 4].pop(); q[(i + 1) % 4].push(c); } rep(i, 4) { while (q[i].size()) { char c = q[i].front(); q[i].pop(); cout << c; } cout << endl; } return 0; }