from collections import deque q = [deque() for i in range(4)] q[0].append("A") q[1].append("B") q[2].append("C") q[3].append("D") q[0].append("E") k = int(input()) for i in range(k): t = q[i%4].popleft() q[(i+1)%4].append(t) for i in range(4): print("".join(q[i]))