N = gets.chomp.to_i

@ans = Hash.new{ |h,k| h[k] = []}



def dfs (char, depth)
  return if depth == N
  c = 'a'

  (depth+1).times do
    next_char = [char, c].join
    @ans[depth+1] << next_char
    dfs(next_char, depth + 1)
    c.next!
  end
end


@ans[1] << 'a'
dfs('a',1)

puts @ans[N]
