#include <bits/stdc++.h>
using namespace std;
char ch[10] = {'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a'};
int main() {
  int n;
  cin >> n;
  while (ch[0] == 'a') {
    for (int i = n - 1; i > 0; i--) {
      if (ch[i] - 1 <= ch[i - 1]) break;
      ch[i - 1]++;
      ch[i] = 'a';
    }
    if (ch[0] != 'a') break;
    for (int i = 0; i < n; i++) cout << ch[i];
    cout << endl;
    ch[n - 1]++;
  }
}
