from itertools import product
N = int(input())

alphabets = list('abcdefghijklmn')[:10]
for i in product(
        alphabets[:1],
        alphabets[:2],
        alphabets[:3],
        alphabets[:4],
        alphabets[:5],
        alphabets[:6],
        alphabets[:7],
        alphabets[:8],
        alphabets[:9],
        alphabets[:10],
):
    print(''.join(i))
