#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int mainsolve() {
  long long n;
  cin >> n;
  vector<string> ss(pow(2, n - 1));
  for (long long i = 0; i < (pow(2, n - 1)); ++i) {
    string res = "";
    for (long long j = 0; j < (n); ++j) {
      long long mask = pow(2, n - 1 - j);
      if ((i & mask) == 0) {
        if (res.back() == 'b')
          res += 'b';
        else
          res += 'a';
      } else {
        if (res.back() == 'a')
          res += 'b';
        else
          res += 'a';
      }
    }
    ss[i] = res;
  }
  sort(ss.begin(), ss.end());
  for (long long i = 0; i < (pow(2, n - 1)); ++i) {
    cout << ss[i] << endl;
  }
  return 0;
  assert(false);
}
int main() {
  mainsolve();
  return 0;
}
