#include typedef long long ll; using namespace std; int main() { string s = "EABCDEABCD"; int n; cin >> n; string t = s.substr((5 - n / 4) % 5, 5); if (n % 4 == 0) { cout << t[1]; cout << t[0] << endl; cout << t[2] << endl; cout << t[3] << endl; cout << t[4] << endl; } if (n % 4 == 1) { cout << t[0] << endl; cout << t[2]; cout << t[1] << endl; cout << t[3] << endl; cout << t[4] << endl; } if (n % 4 == 2) { cout << t[0] << endl; cout << t[1] << endl; cout << t[3]; cout << t[2] << endl; cout << t[4] << endl; } if (n % 4 == 3) { cout << t[0] << endl; cout << t[1] << endl; cout << t[2] << endl; cout << t[4]; cout << t[3] << endl; } return 0; }