#include <bits/stdc++.h>
using namespace std;
constexpr long long Mod = 998244353;
constexpr long long mod = 1e9 + 7;
constexpr long long inf = 1LL << 60;
template <typename T>
constexpr bool chmax(T &a, const T b) {
  if (a >= b) return false;
  a = b;
  return true;
}
template <typename T>
constexpr bool chmin(T &a, const T b) {
  if (a <= b) return false;
  a = b;
  return true;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  int k = n - 1;
  for (long long i = (long long)0; i < (long long)1 << k; i++) {
    char c = 'a';
    cout << c;
    for (long long j = (long long)k - 1LL; j >= 0LL; j--) {
      if (i >> j & 1) c++;
      cout << c;
    }
    cout << endl;
  }
  return 0;
}
