#include <bits/stdc++.h>
int n, a[15];
void dfs(int x, int pre) {
  if (x == n) {
    for (int i = 0; i < n; i++) putchar(a[i] + 'a');
    putchar('\n');
    return;
  }
  a[x] = pre;
  dfs(x + 1, pre);
  if (x) {
    a[x] = pre + 1;
    dfs(x + 1, pre + 1);
  }
}
int main() {
  scanf("%d", &n);
  dfs(0, 0);
  return 0;
}
