#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 5;
const long long MOD = 1000000007LL;
int main() {
  int n;
  cin >> n;
  vector<vector<string> > vecto(n);
  vecto[0].push_back("a");
  for (int i = 1; i < n; i++) {
    for (auto s : vecto[i - 1]) {
      if (s[s.size() - 1] == 'a') {
        vecto[i].push_back(s + 'a');
        vecto[i].push_back(s + 'b');
      }
      if (s[s.size() - 1] == 'b') {
        vecto[i].push_back(s + 'a');
        vecto[i].push_back(s + 'b');
        vecto[i].push_back(s + 'c');
      }
      if (s[s.size() - 1] == 'c') {
        vecto[i].push_back(s + 'a');
        vecto[i].push_back(s + 'b');
        vecto[i].push_back(s + 'c');
        vecto[i].push_back(s + 'd');
      }
      if (s[s.size() - 1] == 'd') {
        vecto[i].push_back(s + 'a');
        vecto[i].push_back(s + 'b');
        vecto[i].push_back(s + 'c');
        vecto[i].push_back(s + 'd');
        vecto[i].push_back(s + 'e');
      }
      if (s[s.size() - 1] == 'e') {
        vecto[i].push_back(s + 'a');
        vecto[i].push_back(s + 'b');
        vecto[i].push_back(s + 'c');
        vecto[i].push_back(s + 'd');
        vecto[i].push_back(s + 'e');
        vecto[i].push_back(s + 'f');
      }
      if (s[s.size() - 1] == 'f') {
        vecto[i].push_back(s + 'a');
        vecto[i].push_back(s + 'b');
        vecto[i].push_back(s + 'c');
        vecto[i].push_back(s + 'd');
        vecto[i].push_back(s + 'e');
        vecto[i].push_back(s + 'f');
        vecto[i].push_back(s + 'g');
      }
      if (s[s.size() - 1] == 'g') {
        vecto[i].push_back(s + 'a');
        vecto[i].push_back(s + 'b');
        vecto[i].push_back(s + 'c');
        vecto[i].push_back(s + 'd');
        vecto[i].push_back(s + 'e');
        vecto[i].push_back(s + 'f');
        vecto[i].push_back(s + 'g');
        vecto[i].push_back(s + 'h');
      }
      if (s[s.size() - 1] == 'h') {
        vecto[i].push_back(s + 'a');
        vecto[i].push_back(s + 'b');
        vecto[i].push_back(s + 'c');
        vecto[i].push_back(s + 'd');
        vecto[i].push_back(s + 'e');
        vecto[i].push_back(s + 'f');
        vecto[i].push_back(s + 'g');
        vecto[i].push_back(s + 'h');
        vecto[i].push_back(s + 'i');
      }
      if (s[s.size() - 1] == 'i') {
        vecto[i].push_back(s + 'a');
        vecto[i].push_back(s + 'b');
        vecto[i].push_back(s + 'c');
        vecto[i].push_back(s + 'd');
        vecto[i].push_back(s + 'e');
        vecto[i].push_back(s + 'f');
        vecto[i].push_back(s + 'g');
        vecto[i].push_back(s + 'h');
        vecto[i].push_back(s + 'i');
        vecto[i].push_back(s + 'j');
      }
    }
  }
  for (auto s : vecto[n - 1]) {
    cout << s << endl;
  }
}
