#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n;
  vector<string> s;
  cin >> n;
  for (long long i = 0; i < (1 << n); i++) {
    string c = {};
    for (long long j = n - 1; j >= 0; j--) {
      if (i & (1 << j)) {
        c += 'a';
      } else {
        c += 'b';
      }
    }
    s.push_back(c);
  }
  for (long long i = s.size() - 1; i >= s.size() / 2; i--) {
    cout << s[i] << "\n";
  }
}
