#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
int n;
vector<string> ans;
void rec(int cnt, char c, string &s) {
  if (cnt > n) {
    return;
  }
  if (cnt == n) {
    ans.push_back(s);
  }
  for (int i = 1; i <= 10; i++) {
    for (int x = 1; x <= i; x++) {
      s.push_back(c + 1);
    }
    rec(cnt + i, c + 1, s);
    for (int x = 1; x <= i; x++) {
      s.pop_back();
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  string s = "";
  rec(0, 'a' - 1, s);
  sort(ans.begin(), ans.end());
  for (auto to : ans) {
    cout << to << '\n';
  }
  return 0;
}
