#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
using V = vector<T>;
template <class T, class U>
using P = pair<T, U>;
using vll = V<ll>;
using vvll = V<vll>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const long long MOD = 1000000007;
const long long HIGHINF = (long long)1e18;
const int INF = (int)1e9;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll n;
  cin >> n;
  V<string> ans;
  for (ll state = 0; state < (1 << (n - 1)); state++) {
    string s;
    for (ll i = n - 1; i >= 0; i--) {
      if ((state >> i) & 1)
        s.push_back('b');
      else
        s.push_back('a');
    }
    ans.emplace_back(s);
  }
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << '\n';
  return 0;
}
