#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < ((2 << (n - 1)) / 2); ++i) {
    string s = "";
    bitset<10> b(i);
    for (int j = 0; j < (n); ++j) {
      if (b[n - j - 1] == 0)
        s += "a";
      else
        s += "b";
    }
    cout << s << endl;
  }
  string t = "";
  for (int i = 0; i < (n); ++i) {
    t += 'a' + i;
  }
  if (n > 2) cout << t << endl;
  return 0;
}
