package main

import (
	"fmt"
	"strings"
)

func stringEquivalence(n int) string {
	var r []string
	var s []byte

	for i := 0; i < n; i++ {
		s = append(s, 'a')
	}

	r = append(r, string(s))

	for i := 0; i < n; i++ {
		for j := 0; j < n-i-1; j++ {
			idx := n - j - 1
			s[idx] = s[idx] + 1
			r = append(r, string(s))
		}
	}

	return strings.Join(r, "\n")
}

func main() {
	var n int
	fmt.Scan(&n)
	r := stringEquivalence(n)
	fmt.Print(r)
}
