#include <bits/stdc++.h>
using namespace std;
int main() {
  int mask, i, n, s, j;
  cin >> n;
  s = n - 1;
  string res;
  vector<string> v;
  for (mask = 0; mask < (1 << s); ++mask) {
    res = "";
    for (j = s - 1; j >= 0; --j) {
      if ((mask & (1 << j)) != 0)
        res = res + "b";
      else
        res = res + "a";
    }
    v.push_back("a" + res);
  }
  if (n >= 3) {
    res = "";
    for (i = 0; i < n; ++i) {
      res = res + char('a' + i);
    }
    v.push_back(res);
  }
  for (i = 0; i < v.size(); ++i) cout << v[i] << '\n';
}
