n = gets.to_i

new = ["a"]

(n-1).times do |i|
    o = new
    new = []
    # p o
    o.each do |t|
        type = t.chars.uniq.size
        (type+1).times do |j|
            # p (97 + j).chr
            new.append(t+(97+j).chr)
        end
    end
end


puts new
