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