#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 7;
int n, m, k;
char ch[maxn];
void dfs(int x, char c) {
  ch[x] = c;
  if (x == n - 1) {
    ch[n] = '\0';
    printf("%s\n", ch);
    return;
  }
  for (char next = 'a'; next <= 'z' && next <= c + 1; next += 1) {
    dfs(x + 1, next);
  }
}
int main() {
  scanf("%d", &n);
  dfs(0, 'a');
  return 0;
}
