def main():
    n = int(input())
    al = "abcdefghij"
    if n == 1:
        print("a")
    elif n == 2:
        print("aa", "ab", sep="\n")
    elif n == 3:
        print("aaa", "aab", "aba", "abb", "abc", sep="\n")
    elif n == 4:
        print("aaaa", "aaab", "aaba","aabb", "aabc", "abaa", "abab", "abac","abba", "abbb", "abbc", "abca","abcb","abcc","abcd", sep="\n")


if __name__ == '__main__':
    main()