import random n = int(input()) used_words = [] for i in range(n): while True: word_length = random.choice(range(20)) if used_words: word = used_words[-1][-1] + ''.join([chr(97 + x) for x in random.choices(range(26), k=word_length)]) else: word = ''.join([chr(97 + x) for x in random.choices(range(26), k=word_length)]) if word[-1] == 'n' or word in used_words or ((i == n-1) and (len(word) == 20)): continue if i == n-1: word += 'n' used_words.append(word) break for i in used_words: print(i)