#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long n;
  cin >> n;
  vector<string> ans;
  string plus[11];
  plus[1] = 'a';
  plus[2] = 'b';
  plus[3] = 'c';
  plus[4] = 'd';
  plus[5] = 'e';
  plus[6] = 'f';
  plus[7] = 'g';
  plus[8] = 'h';
  plus[9] = 'i';
  plus[10] = 'j';
  ans.push_back("a");
  long long check = ans.size();
  for (long long i = 2; i <= n; i++) {
    for (long long j = 0; j < check; j++) {
      for (long long k = 1; k < i; k++) {
        ans.push_back(ans[j] + plus[k]);
      }
      if (j == check - 1) ans.push_back(ans[j] + plus[i]);
    }
    sort(ans.begin(), ans.begin() + ans.size());
    check = ans.size();
  }
  sort(ans.begin(), ans.begin() + ans.size());
  for (long long i = 0; i < ans.size(); i++) {
    if (ans[i].length() == n) cout << ans[i] << endl;
  }
  return 0;
}
