# 26**4 > 10**5なのでa????aをn-1回やって、最後はanとして終わらせる # ????は26進法のイメージ alphabets = 'abcdefghijklmnopqrstuvwxyz' def Dec_to_N(num, base): if num >= base: yield from Dec_to_N(num // base, base) yield num % base N = int(input()) words = [] for i in range(N-1): num26 = list(Dec_to_N(i, 26)) word26 = 'a' for n in num26: word26 += alphabets[n] word26 += 'a' words.append(word26) #print(i, num26) words.append('an') for w in words: print(w)