#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b, long long c) {
  long long ans = 1;
  while (b) {
    if (b & 1) {
      ans = ans * a % 998244353;
    }
    a = a * a % 998244353;
    b = b / 2;
  }
  return ans;
}
vector<string> ans;
void f(int n, vector<int> v) {
  if (n == 0) {
    string s = "";
    for (int i = 0; i < v.size(); ++i) {
      char cc = (char)(97 + i);
      for (int j = 1; j <= v[i]; j++) s.push_back(cc);
    }
    ans.push_back(s);
    return;
  }
  for (int j = 1; j <= n; ++j) {
    vector<int> ff;
    for (int i = 0; i < v.size(); ++i) {
      ff.push_back(v[i]);
    }
    ff.push_back(j);
    f(n - j, ff);
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> v;
  f(n, v);
  sort(ans.begin(), ans.end());
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] << endl;
}
