n = int(input())

results = []
if n == 1:
    results = ["a"]
elif n == 2:
    results = ["aa", "ab"]
elif n == 3:
    results = ["aaa", "aab", "abb", "abc"]
elif n == 4:
    results = ["aaaa", "aaab", "aabb", "aabc", "abbb", "abbc", "abcc", "abcd"]

for result in results:
    print(result)
