#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
int main() {
  string alp[26] = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j"};
  long long n;
  cin >> n;
  vector<string> ans, ini, ans2;
  ans.push_back("a");
  for (int i = 0; i < n - 1; i++) {
    long long s = ans.size();
    for (int j = 0; j < s; j++) {
      for (int k = 0; k < i + 2; k++) {
        ans2.push_back(ans[j] + alp[k]);
      }
    }
    ans = ans2;
  }
  sort(ans.begin(), ans.end());
  for (int i = 0; i < ans.size(); i++) {
    if (ans[i].size() == n) cout << ans[i] << endl;
  }
}
