#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  string S(N, 'a');
  vector<int> T(N, 0);
  cout << S << endl;
  if (N == 1) return 0;
  while (1) {
    bool done = false;
    T[0]++;
    for (int i = 0; i < N - 1; i++) {
      if (T[i] > T[i + 1] + 1) {
        if (i + 1 == N - 1) {
          done = true;
          break;
        }
        T[i] = 0;
        T[i + 1]++;
      }
    }
    if (done) return 0;
    for (int i = 0; i < N; i++) cout << (char)(S[i] + T[N - 1 - i]);
    cout << endl;
  }
  return 0;
}
