#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e12;
const int inf = 1e9;
const int mod = 1e9 + 7;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  cout << fixed << setprecision(10);
  int n;
  cin >> n;
  queue<string> que;
  que.push("a");
  int cnt = 1;
  while (1) {
    if (cnt == 1 << (n - 1)) break;
    string fa = que.front();
    que.pop();
    que.push(fa + "a");
    que.push(fa + "b");
    cnt++;
  }
  while (!que.empty()) {
    cout << que.front() << endl;
    que.pop();
  }
  return 0;
}
