import itertools

N = int(input())


for i in itertools.combinations_with_replacement(list("abcdefghij")[:N], N):
    if i[0] not in list("abcdefghij")[:1]:
        break
    if N > 1 and i[1] not in list("abcdefghij")[:2]:
        break
    if N > 2 and i[2] not in list("abcdefghij")[:3]:
        break
    if N > 3 and i[3] not in list("abcdefghij")[:4]:
        break
    if N > 4 and i[4] not in list("abcdefghij")[:5]:
        break
    if N > 5 and i[5] not in list("abcdefghij")[:6]:
        break
    if N > 6 and i[6] not in list("abcdefghij")[:7]:
        break
    if N > 7 and i[7] not in list("abcdefghij")[:8]:
        break
    if N > 8 and i[8] not in list("abcdefghij")[:9]:
        break
    if N > 9 and i[9] not in list("abcdefghij")[:10]:
        break
    print(*i, sep="")