#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int main() {
  int n;
  cin >> n;
  string s = "";
  for (int i = 0; i < n; i++) s += 'a';
  int f = 1;
  while (f < n) {
    while ((s[n - 1] - 'a') < f) {
      cout << s << "\n";
      s[n - 1] = s[n - 1] + 1;
    }
    cout << s << "\n";
    string s1 = s.substr(0, n - f - 1), s2 = s.substr(n - f, n);
    s = s1 + s2;
    for (int i = s.size(); i < n; i++) s += 'a';
    f++;
  }
}
