#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  int n;
  scanf("%d", &n);
  switch (n) {
    case 1:
      puts("a");
      return 0;
    case 2:
      puts("aa\nab");
      return 0;
    case 3:
      puts("aaa\naab\naba\nabb\nabc");
      return 0;
    case 4:
      for (char b = 'a'; b <= 'b'; b++)
        for (char c = 'a'; c <= 'c'; c++)
          for (char d = 'a'; d <= 'd'; d++)
            putchar('a'), putchar(b), putchar(c), putchar(d), putchar('\n');
      return 0;
    case 5:
      for (char b = 'a'; b <= 'b'; b++)
        for (char c = 'a'; c <= 'c'; c++)
          for (char d = 'a'; d <= 'd'; d++)
            for (char e = 'a'; e <= 'e'; e++)
              putchar('a'), putchar(b), putchar(c), putchar(d), putchar(e),
                  putchar('\n');
      return 0;
    case 6:
      for (char b = 'a'; b <= 'b'; b++)
        for (char c = 'a'; c <= 'c'; c++)
          for (char d = 'a'; d <= 'd'; d++)
            for (char e = 'a'; e <= 'e'; e++)
              for (char f = 'a'; f <= 'f'; f++)
                putchar('a'), putchar(b), putchar(c), putchar(d), putchar(e),
                    putchar(f), putchar('\n');
      return 0;
    case 7:
      for (char b = 'a'; b <= 'b'; b++)
        for (char c = 'a'; c <= 'c'; c++)
          for (char d = 'a'; d <= 'd'; d++)
            for (char e = 'a'; e <= 'e'; e++)
              for (char f = 'a'; f <= 'f'; f++)
                for (char g = 'a'; g <= 'g'; g++)
                  putchar('a'), putchar(b), putchar(c), putchar(d), putchar(e),
                      putchar(f), putchar(g), putchar('\n');
      return 0;
    case 8:
      for (char b = 'a'; b <= 'b'; b++)
        for (char c = 'a'; c <= 'c'; c++)
          for (char d = 'a'; d <= 'd'; d++)
            for (char e = 'a'; e <= 'e'; e++)
              for (char f = 'a'; f <= 'f'; f++)
                for (char g = 'a'; g <= 'g'; g++)
                  for (char h = 'a'; h <= 'h'; h++)
                    putchar('a'), putchar(b), putchar(c), putchar(d),
                        putchar(e), putchar(f), putchar(g), putchar(h),
                        putchar('\n');
      return 0;
    case 9:
      for (char b = 'a'; b <= 'b'; b++)
        for (char c = 'a'; c <= 'c'; c++)
          for (char d = 'a'; d <= 'd'; d++)
            for (char e = 'a'; e <= 'e'; e++)
              for (char f = 'a'; f <= 'f'; f++)
                for (char g = 'a'; g <= 'g'; g++)
                  for (char h = 'a'; h <= 'h'; h++)
                    for (char i = 'a'; i <= 'i'; i++)
                      putchar('a'), putchar(b), putchar(c), putchar(d),
                          putchar(e), putchar(f), putchar(g), putchar(h),
                          putchar(i), putchar('\n');
      return 0;
    default:
      for (char b = 'a'; b <= 'j'; b++)
        for (char c = 'a'; c <= 'c'; c++)
          for (char d = 'a'; d <= 'd'; d++)
            for (char e = 'a'; e <= 'e'; e++)
              for (char f = 'a'; f <= 'f'; f++)
                for (char g = 'a'; g <= 'g'; g++)
                  for (char h = 'a'; h <= 'h'; h++)
                    for (char i = 'a'; i <= 'i'; i++)
                      for (char j = 'a'; j <= 'j'; j++)
                        putchar('a'), putchar(b), putchar(c), putchar(d),
                            putchar(e), putchar(f), putchar(g), putchar(h),
                            putchar(i), putchar(j), putchar('\n');
  }
  return 0;
}
