#include <bits/stdc++.h>
int main(void) {
  int N, i[10];
  char a[10] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'};
  scanf("%d", &N);
  for (i[0] = 0; i[0] < 1; i[0]++) {
    if (N > 1) {
      for (i[1] = 0; i[1] < i[0] + 2; i[1]++) {
        if (N > 2) {
          for (i[2] = 0; i[2] < i[1] + 2; i[2]++) {
            if (N > 3) {
              for (i[3] = 0; i[3] < i[2] + 2; i[3]++) {
                if (N > 4) {
                  for (i[4] = 0; i[4] < i[3] + 2; i[4]++) {
                    if (N > 5) {
                      for (i[5] = 0; i[5] < i[4] + 2; i[5]++) {
                        if (N > 6) {
                          for (i[6] = 0; i[6] < i[5] + 2; i[6]++) {
                            if (N > 7) {
                              for (i[7] = 0; i[7] < i[6] + 2; i[7]++) {
                                if (N > 8) {
                                  for (i[8] = 0; i[8] < i[7] + 2; i[8]++) {
                                    if (N > 9) {
                                      for (i[9] = 0; i[9] < i[2] + 8; i[9]++)
                                        printf("%c%c%c%c%c%c%c%c%c%c\n",
                                               a[i[0]], a[i[1]], a[i[2]],
                                               a[i[3]], a[i[4]], a[i[5]],
                                               a[i[6]], a[i[7]], a[i[8]],
                                               a[i[9]]);
                                    } else
                                      printf("%c%c%c%c%c%c%c%c%c\n", a[i[0]],
                                             a[i[1]], a[i[2]], a[i[3]], a[i[4]],
                                             a[i[5]], a[i[6]], a[i[7]],
                                             a[i[8]]);
                                  }
                                } else
                                  printf("%c%c%c%c%c%c%c%c\n", a[i[0]], a[i[1]],
                                         a[i[2]], a[i[3]], a[i[4]], a[i[5]],
                                         a[i[6]], a[i[7]]);
                              }
                            } else
                              printf("%c%c%c%c%c%c%c\n", a[i[0]], a[i[1]],
                                     a[i[2]], a[i[3]], a[i[4]], a[i[5]],
                                     a[i[6]]);
                          }
                        } else
                          printf("%c%c%c%c%c%c\n", a[i[0]], a[i[1]], a[i[2]],
                                 a[i[3]], a[i[4]], a[i[5]]);
                      }
                    } else
                      printf("%c%c%c%c%c\n", a[i[0]], a[i[1]], a[i[2]], a[i[3]],
                             a[i[4]]);
                  }
                } else
                  printf("%c%c%c%c\n", a[i[0]], a[i[1]], a[i[2]], a[i[3]]);
              }
            } else
              printf("%c%c%c\n", a[i[0]], a[i[1]], a[i[2]]);
          }
        } else
          printf("%c%c\n", a[i[0]], a[i[1]]);
      }
    } else
      printf("%c\n", a[i[0]]);
  }
  return 0;
}
