def main():
    N = int(input())
    list = [97] * N
    count = 0
    for i in range(0, (2 ** N)-1):
        if count == N:
            break
        s = format(i, '0{}b'.format(N))

        for j, k in enumerate(s):
            list[j] += int(k)
            print(chr(list[j]), end="")
        print(end="\n")
        count += 1


    return 0


if __name__ == '__main__':
    main()