#include <bits/stdc++.h>
using namespace std;
int n;
char a[11];
inline bool nt() {
  int i;
  for (i = n - 1; i; --i)
    if (a[i] <= a[i - 1]) break;
  if (!i) return 0;
  ++a[i];
  fill(a + i + 1, a + n, 'a');
  return 1;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; ++i) a[i] = 'a';
  do {
    for (int i = 0; i < n; ++i) cout << a[i];
    cout << endl;
  } while (nt());
}
