def main():
    n = int(input())
    if n == 1:
        print("a")
    else:
        for i in range(2 ** (n - 1)):
            bin_i = bin(i)[2:].zfill(n - 1)
            answer = "a"
            for b in bin_i:
                if b == "0":
                    answer += "a"
                else:
                    answer += "b"
            print(answer)


if __name__ == '__main__':
    main()

