#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, const T &b) {
  return b > a ? a = b, true : false;
}
template <class T>
inline bool chmin(T &a, const T &b) {
  return b < a ? a = b, true : false;
}
template <class T>
using MaxHeap = priority_queue<T>;
template <class T>
using MinHeap = priority_queue<T, vector<T>, greater<T>>;
template <class T, class F = less<T>>
void sort_uniq(vector<T> &v, F f = F()) {
  sort(begin(v), end(v), f);
  v.resize(unique(begin(v), end(v)) - begin(v));
}
int n;
map<int, set<string>> mp;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  mp[0].insert("");
  mp[1].insert("a");
  string x = "a";
  for (int i = 2; i <= n; i++) {
    for (int j = 1; j <= (n + 1) / 2; j++) {
      int k = i - j;
      for (auto s : mp[j]) {
        for (auto t : mp[k]) {
          mp[i].insert(s + t);
        }
      }
    }
    x += (char)('a' + i - 1);
    mp[i].insert(x);
  }
  for (string s : mp[n]) {
    cout << s << endl;
  }
  return 0;
}
