n = gets.chomp.to_i
if n == 1
  puts 'a'
  exit
end
flag_num = [['a']*n, ['b']*n].flatten
petterns = flag_num.permutation(n).to_a.uniq
tmp = petterns.size / 2
array = petterns[0..tmp-1]
ans = array.map(&:join)

ans.each { |a|  puts a }