#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
const long long INF = 100000000000010000;
vector<long long> dx = {0, 1, 0, -1, 1, -1, 1, -1, 0};
vector<long long> dy = {1, 0, -1, 0, 1, 1, -1, -1, 0};
void chmin(long long& x, long long y) { x = min(x, y); }
void chmax(long long& x, long long y) { x = max(x, y); }
long long pow_long(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y % 2 == 1) res *= x;
    x *= x;
    y /= 2;
  }
  return res;
}
void test() { cout << "888888888888888888888888" << endl; }
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
long long pow_mod(long long x, long long k) {
  x %= mod;
  long long res = 1;
  while (k > 0) {
    if (k % 2) {
      res *= x;
      res %= mod;
    }
    x *= x;
    x %= mod;
    k /= 2;
  }
  return res;
}
long long div_mod(long long x) { return pow_mod(x, mod - 2); }
const int MAXcomb = 1000010;
long long fac[MAXcomb], finv[MAXcomb], inv[MAXcomb];
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (int i = 2; i < MAXcomb; i++) {
    fac[i] = fac[i - 1] * i % mod;
    inv[i] = mod - inv[mod % i] * (mod / i) % mod;
    finv[i] = finv[i - 1] * inv[i] % mod;
  }
}
long long comb(int n, int k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * finv[k] % mod * finv[n - k] % mod;
}
vector<string> vec[12], tem[12];
long long N;
char C[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l'};
void solve() {
  vec[1].push_back("a");
  cin >> N;
  for (long long _ = 0; _ < (N - 1); _++) {
    for (long long i = 0; i < (11); i++) tem[i].clear();
    for (long long i = 1; i <= 10; i++) {
      for (string second : vec[i]) {
        for (long long j = 1; j <= i; j++) {
          tem[i].push_back(second + C[j - 1]);
        }
        tem[i + 1].push_back(second + C[i]);
      }
    }
    for (long long i = 0; i < (11); i++) {
      vec[i].clear();
      for (string second : tem[i]) vec[i].push_back(second);
    }
  }
  for (long long i = 0; i < (11); i++)
    for (string second : vec[i]) cout << second << endl;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long pair<long long, pair<long long, long long> > = 1;
  for (long long i = 0; i < (pair<long long, pair<long long, long long> >); i++)
    solve();
}
