
import glob


# 問題ごとのディレクトリのトップからの相対パス
REL_PATH = 'ABC\\159\\D'

# テスト用ファイル置き場のトップ
TOP_PATH = 'C:\\AtCoder'

class Common:

    problem = []
    index = 0

    def __init__(self, rel_path):
        self.rel_path = rel_path

    def initialize(self, path):
        file = open(path)
        self.problem = file.readlines()
        self.index = 0
        return

    def input_data(self):
        try:
            IS_TEST
            self.index += 1
            return self.problem[self.index-1]

        except NameError:
            return input()

    def resolve(self):
        pass

    def exec_resolve(self):
        try:
            IS_TEST
            for path in glob.glob(TOP_PATH + '\\' + self.rel_path + '/*.txt'):
                print("Test: " + path)
                self.initialize(path)
                self.resolve()
                print("\n\n")
        except NameError:
            self.resolve()


class Solver(Common):

    alph = []

    def rec(self, result, now, N):

        if now == N:
            res = ""
            for i in result:
                res += self.alph[i]
            print(res)
            return

        if now == 0:
            result[0] = 0
            self.rec(result, now+1, N)
            return

        if result[now-1] == 25:
            result[now] = 25
            self.rec(result, now+1, N)
            return

        for i in range(result[now-1], result[now-1]+2):
            result[now] = i
            self.rec(result, now+1, N)

    def resolve(self):

        N = int(self.input_data())

        self.alph = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z".split(",")
        self.result = [0 for i in range(N)]
        self.rec(self.result, 0, N)


solver = Solver(REL_PATH)
solver.exec_resolve()
