#include <bits/stdc++.h>
using namespace std;
bool isFinish(vector<int> work, int N) {
  for (int i = 0; i < N; ++i) {
    if (i != work[i]) {
      return false;
    }
  }
  return true;
}
void outPut(vector<int> work) {
  string alphabet = {"abcdefghijklmnopqrstuvwxyz"};
  string result = "";
  for (int w : work) {
    result.push_back(alphabet[w]);
  }
  cout << result << endl;
}
int main(void) {
  int N = 0;
  cin >> N;
  vector<int> work(N, 0);
  while (!isFinish(work, N)) {
    outPut(work);
    if (work[N - 2] >= work[N - 1]) {
      ++work[N - 1];
      continue;
    } else {
      work[N - 1] = 0;
      for (int n = N - 2; n >= 1; --n) {
        ++work[n];
        if (work[n] > work[n - 1] + 1) {
          work[n] = 0;
          ++work[n - 1];
        } else {
          break;
        }
      }
    }
  }
  outPut(work);
  return 0;
}
