#include <bits/stdc++.h>
int n;
char s[20];
void dfs(int x, char now) {
  s[x] = now;
  if (x == n - 1) {
    printf("%s\n", s);
    return;
  }
  dfs(x + 1, now);
  dfs(x + 1, now + 1);
}
int main() {
  scanf("%d", &n);
  dfs(0, 'a');
  return 0;
}
