#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5000;
int n, m, T;
vector<string> a;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  string str = "";
  for (int i = 1; i < n; i++) str += 'a';
  if (n == 1)
    cout << "a";
  else {
    a.push_back("a");
    a.push_back("b");
    int len = 1, siz = a.size();
    for (int i = 0; i < siz; i++) {
      cout << str << a[i] << endl;
      a[i] = 'a' + a[i];
    }
    while (len + 1 < n) {
      len++;
      str = str.substr(0, str.length() - 1);
      int siz = a.size();
      for (int i = 0; i < siz; i++) {
        string s = a[i];
        for (int j = 0; j < len; j++) s[j]++;
        a.push_back(s);
        cout << str << s << endl;
      }
      siz = a.size();
      for (int i = 0; i < siz; i++) a[i] = 'a' + a[i];
    }
  }
}
