#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> ans(1 << n / 2);
  for (int bit = 0; bit < (1 << n) / 2; bit++) {
    for (int i = n - 1; i >= 0; i--) {
      if (bit & (1 << i))
        ans[bit] += "b";
      else
        ans[bit] += "a";
    }
  }
  sort(ans.begin(), ans.end());
  for (int i = 0; i < (ans.size()); i++) {
    cout << ans[i] << endl;
  }
}
