#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
ll gcd(ll a, ll b) {
  ll tmp;
  if (b > a) {
    tmp = a;
    a = b;
    b = tmp;
  }
  while (a % b != 0) {
    tmp = b;
    b = a % b;
    a = tmp;
  }
  return b;
}
const int MAX = 2000;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (int i = 2; i < MAX; i++) {
    fac[i] = fac[i - 1] * i % 1000000007;
    inv[i] = 1000000007 - inv[1000000007 % i] * (1000000007 / i) % 1000000007;
    finv[i] = finv[i - 1] * inv[i] % 1000000007;
  }
}
long long COM(int n, int k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % 1000000007) % 1000000007;
}
void sosuu(ll n, vector<ll> &v) {
  vector<ll> num(n, 0);
  for (ll i = (1); i <= (sqrt(n)); i++) {
    if (num[i] == 0) {
      for (ll j = (0); j <= (n / i); j++) {
        num[i + (j * i)] = 1;
      }
    }
  }
  for (ll i = 0; i < (ll)(n); i++) {
    if (num[i] == 0) v.push_back(i + 1);
  }
}
ll GetDigit(ll num) {
  ll digit = 0;
  while (num != 0) {
    num /= 10;
    digit++;
  }
  return digit;
}
int main(void) {
  ll n;
  cin >> n;
  queue<pair<char, string>> q;
  q.push(make_pair('a', "a"));
  while (q.size() != 0) {
    pair<char, string> now = q.front();
    q.pop();
    if ((now.second).size() == n) {
      cout << now.second << endl;
    } else {
      for (char X = 'a'; X <= now.first + 1; X++) {
        q.push(make_pair(X, now.second + X));
      }
    }
  }
  return 0;
}
