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