#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif using ll = long long; #define rep(i, n) for (int i = 0; i < (n); ++i) int main() { int k; cin >> k; vector> q(4); q[0].push('A'), q[1].push('B'), q[2].push('C'), q[3].push('D'), q[0].push('E'); rep(i, k) { int t = q[i % 4].front(); q[i % 4].pop(); q[(i + 1) % 4].push(t); } rep(i, 4) { while (!q[i].empty()) { cout << q[i].front(); q[i].pop(); } cout << endl; } return 0; }