#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
char st[] = {'a', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'};
int n;
vector<char> s;
void dfs(int step) {
  if (step == n + 1) {
    for (auto v : s) cout << v;
    cout << endl;
    return;
  }
  for (int i = 1; i <= step; i++) {
    s.push_back(st[i]);
    dfs(step + 1);
    s.pop_back();
  }
}
int main() {
  cin >> n;
  dfs(1);
  return 0;
}
