using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    static char[] n = new char[]{ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' };
    static void Main()
	{
        var s = int.Parse(Console.ReadLine());
        var a = new int[s];
        var b = new char[s].Select(v => 'a').ToArray();

        var text = "";
        var oldText = "";
        for (int i = 0; i < s; i++)
        {
            oldText += n[0];
        }
        Console.WriteLine(oldText);
        while (text != oldText && s > 1)
        {
            oldText = text;
            text = "";
            Re(ref a, ref b);
            for (int i = 0; i < s; i++)
            {
                text += b[i];
            }
            if (text != oldText)
            {
                Console.WriteLine(text);
            }
        }
	}
    static void Re(ref int[] a,ref char[] b)
    {
        for (int i = b.Length - 1; i > 0; i--)
        {
            if (b[i - 1] == b[i])
            {
                a[i]++;
                b[i] = n[a[i]];
                break;
            }
        }
    }
}