k = int(input()) que = ['AE','B','C','D'] for i in range(k): plus = que[i%4][0] que[(i+1)%4]+=plus que[i%4] = que[i%4][1:] for i in range(4): print(que[i])