#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7, MAX = 1e5;
int main() {
  int n;
  cin >> n;
  string s;
  for (int i = 0; i < n; i++) s.push_back('a');
  while (1) {
    reverse(s.begin(), s.end());
    cout << s << endl;
    reverse(s.begin(), s.end());
    int i = 0;
    for (; s[i] == s[i + 1] + 1; i++) {
      s[i] = 'a';
    }
    if (i == n - 1) break;
    if (i != 0)
      s[i]++;
    else
      s[0]++;
  }
  return 0;
}
