package main

import (
  "fmt"
  "strconv"
)

func rec(s string, ln int, mx int) {
  if len(s) == ln {
    fmt.Println(s)
  }else{
    for i := int('a'); i < mx; i++ {
      rec(s + strconv.Itoa(i), ln, mx)
    }
    rec(s + strconv.Itoa(mx), ln, mx + 1)
  }
}