#include <bits/stdc++.h>
using namespace std;
constexpr long long MOD = 1e9 + 7;
int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
int dy[8] = {0, 1, 0, -1, 1, -1, 1, -1};
long long D, E, F, G, H, N, M, L, K, P, Q, R, W, X, Y, Z;
string S, T;
long long ans = 0;
template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
  for (T &x : vec) is >> x;
  return is;
}
int intceil(int a, int b) { return (a + (b - 1)) / b; }
signed main() {
  cin >> N;
  vector<vector<string>> mem(10 + 1);
  mem[1].push_back("a");
  mem[2].push_back("aa");
  mem[2].push_back("ab");
  ;
  for (int i = 3; i <= N; i++) {
    for (int j = 0; j < (int)(mem[i - 1].size()); j++) {
      mem[i].push_back('a' + mem[i - 1][j]);
    }
    for (int j = 0; j < (int)(mem[i - 2].size()); j++) {
      mem[i].push_back("ab" + mem[i - 2][j]);
    }
    for (int j = 0; j < (int)(mem[i - 1].size()); j++) {
      string tmp = mem[i - 1][j];
      for (int k = 0; k < (int)(tmp.size()); k++) {
        tmp[k]++;
      }
      mem[i].push_back('a' + tmp);
    }
  }
  for (int i = 0; i < (int)(mem[N].size()); i++) {
    cout << mem[N][i] << "\n";
  }
}
