import strutils, sequtils
let get = iterator: string {.closure.} =
  for s in stdin.readAll.split: yield s
let read = proc: int = get().parseInt
##############################################################

let n = read()
var s = @["a"]

for _ in 2..n:
  let sl = s.len
  for i in 0..<sl:
    var t = ""
    for c in s[i]:
      t.add char(c.ord + 1)
    s.add t
  s.applyIt('a' & it)

for s in s: echo s