#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<string> s[10];
  s[0].push_back("a");
  for (long long i = 1; i < 10; i++) {
    for (long long j = 0; j < s[i - 1].size(); j++) {
      string now = s[i - 1][j];
      long long last = now[now.size() - 1] - 'a';
      for (long long k = 0; k <= last + 1; k++) {
        char next = 'a' + k;
        s[i].push_back(now + next);
        if (i + 1 == n) {
          cout << now + next << endl;
        }
      }
    }
  }
  return 0;
}
