N = int(input())
alphabets = list('Zabcdefghijklmn')
s = ['a']
for i in range(2, N + 1):
    subset = alphabets[1:i + 1]
    # s = [s[j] + k for k in subset for j in range(len(s))]
    s = [s[j] + k for j in range(len(s)) for k in subset]
print(*s, sep='\n')
