#include using namespace std; int main() { vector>tmp(4); tmp[0].push_back(0); tmp[0].push_back(4); tmp[1].push_back(1); tmp[2].push_back(2); tmp[3].push_back(3); int K; cin >> K; for(int i = 0; i < K; i++) { int a = tmp[i%4].front(); tmp[i%4].pop_front(); tmp[(i+1)%4].push_back(a); } for(int i = 0; i < 4; i++) { while (!tmp[i].empty()) { cout << (char)((tmp[i].front()+'A')); tmp[i].pop_front(); } cout << endl; } }