from collections import deque a=deque('A') b=deque('B') c=deque('C') d=deque('D') a.append('E') dic={0:a,1:b,2:c,3:d} k=int(input()) for i in range(1,k+1): if len(dic[(i-1)%4]) == 0: continue dic[i%4].append(dic[(i-1)%4].popleft()) for i in range(4): print(''.join(dic[i]))