from itertools import combinations
n = input()
a = ['a', 'b', 'c', 'd', 'e', 'f' ,'g', 'h', 'i', 'j', 'k']
a  = a[: n]
# print list(combinations(a, 0))
if(n == 1):
	print 'a'*n

def s(i):
	ret = ''
	for k in i:
		ret+=k
	return ret	 
for r in range(1, n):
	l = list(combinations(a, r))
	for i in l:
		# print i
		ans = 'a'
		ans+=s(i)
		for j in range(r+1, n):
			ans+='a'
		print ans
		# print ans, s(i), i

# print a