N=int(input())
"""
1
a
2
aa
ab
3
aaa a3
baa a2
aba a2
aab a2
bba a1
abb a1
abc a1

"""
if N==1:
    print('a')
# まず合計がNになる数値の組み合わせを求める．１番大きい要素から決めていく
else:
    kumiawase = 2**(N-1)
    for i in range(kumiawase):
        binary = format(i, '0'+str(N-1)+'b')
        kazu=[1]
        suuji = 1
        for b in binary:
            if b == '1':
                suuji+=1
            kazu.append(suuji)
        alphabet = [chr(k+97-1) for k in kazu]
        print(''.join(alphabet))












