#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  while (true) {
    for (int i = 0; i < n; i++) cout << char('a' + a[i]);
    cout << "\n";
    bool change = false;
    for (int i = n - 1; i > 0; i--) {
      if (a[i] == a[i - 1]) {
        a[i]++;
        for (int j = i + 1; j < n; j++) {
          a[j] = a[i];
        }
        change = true;
        break;
      }
    }
    if (!change) break;
  }
  return 0;
}
