# coding: utf-8
N = int(input())

arrays = list("abcdefghij")
pat_dic = {i:arrays[i] for i in range(N)}
par_patterns = list(range(10))

patterns = par_patterns[:N]
def next_search(arr,N):
    tmp = arr.copy()
    if len(tmp) == N:
        if check_criteria(tmp):
            print([pat_dic[tmp[i]] for i in range(N)])
        return None
    for st in patterns:
        tmp.append(st)
        next_search(tmp, N)
        tmp = arr.copy()

def check_criteria(arr):
    order = []
    if arr[0] != 0:
        return False
    for val in arr:
        if val in order:
            continue
        else:
            order.append(val)
    for idx in range(1,len(order)):
        if order[idx] - order[idx-1] == 1:
            continue
        else:
            return False
    return True
        
next_search([], N)