#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> v;
  vector<string> ans;
  string s[] = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k"};
  v.push_back("a");
  for (int k = 2; k <= n; k++) {
    for (int i = 0; i < v.size(); i++) {
      for (int j = 0; j < k; j++) {
        ans.push_back(v[i] + s[j]);
      }
    }
    v = ans;
    ans.clear();
  }
  for (int k = 0; k < v.size(); k++) {
    cout << v[k] << endl;
  }
}
