#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
const long long INF = 1e17;
const long long NUM = 1e5 + 1;
long long dp[10005];
long long Query[NUM];
long long modinv(long long a, long long m) {
  long long b = m, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
void createString(int used, int indexRemain, string str) {
  if (indexRemain > 0) {
    int a = (int)'a';
    char c;
    for (int j = 0; j < used + 1; j++) {
      c = a + j;
      createString(max(used, j), indexRemain - 1, str + c);
    }
  } else {
    cout << str << endl;
  }
}
signed main(void) {
  int N;
  cin >> N;
  createString(1, N - 1, "a");
}
