from collections import deque k = int(input()) que0 = deque(['A','E']) que1 = deque(['B']) que2 = deque(['C']) que3 = deque(['D']) x = 0 for i in range(k): if x%4 == 0: que1.append(que0[0]) del que0[0] elif x%4 == 1: que2.append(que1[0]) del que1[0] elif x%4 == 2: que3.append(que2[0]) del que2[0] else: que0.append(que3[0]) del que3[0] x += 1 print(''.join(que0)) print(''.join(que1)) print(''.join(que2)) print(''.join(que3))