CH = ["Z","a","b","c","d","e","f","g","h","i","j"]

def next_ch(n,s,index)
  if n == 1
    puts s
  else
    for i in 1..index+1
      next_ch(n-1,s+CH[i],index+1)
    end
  end

end

n = gets.to_i
next_ch(n,"a",1)