#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int n;
char d[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'};
int dfs(int k, string s) {
  if (k == n) {
    cout << s << endl;
    return 0;
  }
  for (int i = 0; i < (int)(k + 1); ++i) {
    string t = s;
    t += d[i];
    dfs(k + 1, t);
  }
}
int main() {
  cin >> n;
  dfs(0, "");
  return (0);
}
