alphabet = 'abcdefghijklmnopqrstuvwxyz'

def print_tree(node,bfr=[]):
  if len(node)==1: #ex. node = [0]
    for i in bfr:
      print(alphabet[i],end='')
    print(alphabet[node[0]])
  else:# ex. node = [0,[[0],[1]]]
    add = node[0]
    for next_node in node[1]:
      print_tree(next_node,bfr+[add])
    
def N_Str(N,root=0):
  if N == 1:
    return [root]
  else:
    nexts = [N_Str(N-1,i) for i in range(root+2)]
    return [root,nexts]

N = int(input())
#print(N_Str(N))
print_tree(N_Str(N))