#include <bits/stdc++.h>
using namespace std;
long long read() {
  char ch = getchar();
  long long x = 0, f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
char a[15];
int n;
void dfs(int deep) {
  if (deep == n) {
    puts(a);
    return;
  }
  a[deep] = a[deep - 1];
  dfs(deep + 1);
  a[deep] = a[deep - 1] + 1;
  dfs(deep + 1);
}
int main() {
  cin >> n;
  a[0] = 'a';
  dfs(1);
  return 0;
}
