#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const int MOD = 1e9 + 7;
const int INF32 = 1 << 30;
const long long INF64 = 1LL << 60;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  if (n == 1) {
    cout << 'a';
    return 0;
  }
  for (int i = 0; i < (1 << (n - 1)); i++) {
    string ans = "";
    int ii = i;
    for (int j = 0; j < n - 1; j++) {
      if (ii & 1)
        ans = 'b' + ans;
      else
        ans = 'a' + ans;
      ii /= 2;
    }
    cout << 'a' + ans << endl;
  }
  return 0;
}
