#include <bits/stdc++.h>
const long long mod = 1e9 + 7;
using namespace std;
int n;
int w[10];
void printWord() {
  for (int i = 0; i < n; i++) printf("%c", 'a' + w[i]);
  printf("\n");
}
int numDiff() {
  set<int> u;
  for (int i = 0; i < n; i++) u.insert(w[i]);
  return u.size();
}
int max() {
  int ans = w[0];
  for (int i = 0; i < n; i++) ans = max(ans, w[i]);
  return ans;
}
int increment() {
  if (w[n - 1] != n - 1)
    w[n - 1]++;
  else {
    int notLast = n - 1;
    while (w[notLast] == n - 1) {
      w[notLast] = 0;
      notLast--;
    }
    w[notLast]++;
  }
}
void solve() {
  cin >> n;
  for (int i = 0; i < n; i++) w[i] = 0;
  while (w[n - 1] != n - 1) {
    printWord();
    increment();
    while (max() >= numDiff()) increment();
  }
  printWord();
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
