#!/usr/bin/env pypy3 import itertools import string def generate_words(edge_char="a"): for mid_len in range(19): for chars in itertools.product(string.ascii_lowercase, repeat=mid_len): yield edge_char + "".join(chars) + edge_char def main(): n = int(input()) for i, word in enumerate(generate_words()): if i < n: print(word) else: print(word[:-1] + "n") return if __name__ == '__main__': main()