#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
const char nl = '\n';
string ss[10] = {"a",      "aa",      "aaa",      "aaaa",      "aaaaa",
                 "aaaaaa", "aaaaaaa", "aaaaaaaa", "aaaaaaaaa", "aaaaaaaaaa"};
string s;
int n;
int num = 1;
void inc(int k) {
  if (k == 0) {
    return;
  }
  if (n - k == num) {
    num++;
  }
  s[k]++;
  if (s[k] - 'a' == num) {
    inc(k - 1);
    s[k] = 'a';
  }
}
string done = "abcdefghij";
int main() {
  cin >> n;
  s = ss[n - 1];
  cout << s << nl;
  while (done.compare(0, n, s) != 0) {
    inc(n - 1);
    cout << s << nl;
  }
  return 0;
}
