#include <bits/stdc++.h>
#pragma comment(linker, "/stack:512000000")
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
mt19937_64 gen(time(NULL));
ll const mod = 1e9 + 7;
namespace {
ll mul(ll a, ll b) {
  ll val = a * b - (ll)((ld)a * b / mod) * mod;
  if (val < 0) val += mod;
  if (val >= mod) val -= mod;
  return val;
}
ll poww(ll a, ll b) {
  ll val = 1;
  a %= mod;
  while (b > 0) {
    if (b % 2) val = mul(a, val);
    a = mul(a, a);
    b >>= 1;
  }
  return val % mod;
}
ll inv(ll a) { return poww(a, mod - 2); }
}  // namespace
ll const maxn = 3e5 + 5;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  set<string> st;
  for (int mask = 0; mask < (1 << n) - 1; mask++) {
    string s;
    s.resize(n, 'a');
    for (int i = 0; i < n; i++) {
      if ((1 << i) & mask) {
        s[i] = 'b';
      }
    }
    st.insert(s);
  }
  set<string> kek;
  for (string s : st) {
    string ss = s;
    for (int i = 0; i < n; i++) {
      if (ss[i] == 'a')
        ss[i] = 'b';
      else
        ss[i] = 'a';
    }
    if (st.count(ss)) {
      if (ss < s) {
        kek.insert(s);
      } else
        kek.insert(ss);
    }
  }
  for (string s : kek) st.erase(s);
  for (auto s : st) {
    cout << s << '\n';
  }
  return 0;
}
