#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s[10000];
  cin >> n;
  n--;
  if (n == 0) {
    cout << "a" << endl;
    return 0;
  }
  for (int bit = 0; bit < (1 << n); bit++) {
    int sum = 0;
    for (int i = 0; i < n; ++i) {
      if (bit & (1 << i)) {
        s[bit] += 'b';
      } else {
        s[bit] += 'a';
      }
    }
    reverse(s[bit].begin(), s[bit].end());
    cout << 'a' << s[bit] << endl;
  }
  return 0;
}
