# -*- coding: utf-8 -*-
N=int(input())

l0=['a']
l1=[]
li=[0]
li1=[]
alp=[chr(i) for i in range(97, 97+26)]

for i in range(1,N):
    for j, l in enumerate(l0):
        ind=0
        while ind<=li[j]+1:
            l1.append(l+alp[ind])
            if ind==li[j]+1: li1.append(li[j]+1)
            else: li1.append(li[j])
            ind+=1
    l0=l1.copy()
    l1=[]
    li=li1.copy()
    li1=[]

print(l0)
        