#include <bits/stdc++.h>
using namespace std;
int bits[100000] = {0};
void generate(int x, int n) {
  int i = 0;
  while (x > 0) {
    bits[i] = x % 2;
    x = x / 2;
    i++;
  }
  while (i < n) {
    bits[i] = 0;
    i++;
  }
  return;
}
void solve() {
  int n = 0;
  cin >> n;
  int all = 1;
  for (int i = 0; i < n - 1; i++) {
    all *= 2;
  }
  for (int y = 0; y < all; y++) {
    generate(y, n);
    string res = "";
    for (int i = 0; i < n; i++) {
      if (bits[i] == 0) {
        res += 'a';
      } else
        res += 'b';
      bits[i] = 0;
    }
    reverse(res.begin(), res.end());
    cout << res << "\n";
  }
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
