package main

import "fmt"

var n int

func rec(s string, x int) {
	if x >= n {
		fmt.Println(s)
		return
	}
	rec(s+"a", x+1)
	rec(s+"b", x+1)
}

func main() {
	fmt.Scan(&n)

	if n == 1 {
		fmt.Println("a")
		return
	}

	rec("a", 1)
}
