#include <bits/stdc++.h>
using namespace std;
inline void checkmin(int &x, int y) { x = min(x, y); }
inline void checkmax(int &x, int y) { x = max(x, y); }
int n;
void dfs(int cnt, int a, string s) {
  if (cnt == n) {
    cout << s << endl;
    return;
  }
  if (a == 26) {
    return;
  }
  for (int i = n - cnt; i >= 1; i--) {
    string t = s;
    for (int j = 0; j < i; j++) {
      t += (char)('a' + a);
    }
    dfs(cnt + i, a + 1, t);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  dfs(0, 0, "");
  return 0;
}
