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