#include #include using namespace std; int main(){ int k;cin>>k; queue x[4]; x[0].push('A'); x[0].push('E'); x[1].push('B'); x[2].push('C'); x[3].push('D'); for(int i = 0; k > i; i++){ char z = x[i%4].front();x[i%4].pop(); x[(i+1)%4].push(z); } for(int i = 0; 4 > i; i++){ while(x[i].size()){ cout << x[i].front(); x[i].pop(); } cout << endl; } }