#include <bits/stdc++.h>
int main(int argc, char *argv[]) {
  int n;
  char *a;
  scanf("%d", &n);
  a = (char *)calloc(n, 1);
  while (true) {
    for (int i = n - 1; i >= 1; i--) {
      if (a[i] > a[i - 1] + 1) {
        a[i] = 0;
        a[i - 1]++;
      }
    }
    if (a[0] > 0) break;
    for (int j = 0; j < n; j++) {
      printf("%c", 'a' + a[j]);
    }
    printf("\n");
    a[n - 1]++;
  }
  return 0;
}
