chars = ['a','b','c','d','e','f','g','h','i','j']
length = int(input())
def cals(words, num, length):
  work = words
  for val in range(0, length):
    temp = work + chars[val]
    if num + 1 == length:
      print(temp)
    else:
      cals(temp, num + 1, length)
      break
cals('',0 , length)
  