#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 9;
const int INF = 1e9;
const int mod = 1e9;
const int SZ = (1 << 17) - 1;
const int NN = 2e3;
string ans[N];
void solve() {
  long long n;
  cin >> n;
  long long s = 0;
  long long cnt = 1;
  while (true) {
    if (s & (1 << (n - 1))) break;
    long long v = s;
    long long l = n - 1;
    string t = "";
    while (l >= 0) t += (s & (1 << l--) ? 'b' : 'a');
    ans[cnt++] = t;
    ++s;
  }
  for (long long i = 1; i <= cnt; ++i) cout << ans[i] << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  solve();
  return 0;
}
