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