#line 1 "main.cpp" #include #include // #include "library/templates/template.cpp" using namespace atcoder; using namespace std; using ll = long long int; using ull = unsigned long long int; using ld = long double; using pii = pair; using pll = pair; void solve(int K) { vector> qs(4); qs[0].push('A'); qs[0].push('E'); qs[1].push('B'); qs[2].push('C'); qs[3].push('D'); for (int i = 0; i < K; i++) { char x = qs[i % 4].front(); qs[i % 4].pop(); qs[(i + 1) % 4].push(x); } for (int i = 0; i < 4; i++) { while (!qs[i].empty()) { cout << qs[i].front(); qs[i].pop(); } cout << endl; } } int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); std::cout.tie(nullptr); int K; std::cin >> K; solve(K); return 0; }