#include <bits/stdc++.h>
using namespace std;
using Int = int_fast64_t;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  string s(n, 'a');
  while (s[0] == 'a') {
    cout << s << "\n";
    ++s[n - 1];
    for (int i = n - 1; i > 0; --i) {
      if (s[i] == s[i - 1] + 2) {
        s[i] = 'a';
        ++s[i - 1];
      }
    }
  }
}
