#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll N;
  cin >> N;
  ll MAX = (1 << (N - 1));
  for (ll i = 0; i < MAX; i++) {
    vector<ll> d(N, 0);
    ll x = i;
    string s = "";
    for (ll j = 0; j < N; j++) {
      char c = 'a' + (x % 2);
      s = c + s;
      x /= 2;
    }
    cout << s << '\n';
  }
  return 0;
}
