#include <bits/stdc++.h>
int N;
char s[11] = "a";
void nyan(int x) {
  if (x == N) {
    for (int i = 0; i < N; i++) putchar(s[i]);
    putchar(10);
    return;
  }
  for (char c = 'a'; c <= s[x - 1] + 1; c++) {
    s[x] = c;
    nyan(x + 1);
  }
  return;
}
int main() {
  scanf("%d", &N);
  nyan(1);
  return 0;
}
