#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char str[11] = "";
  for (int i = 0; i < n; i++) {
    str[i] = 'a';
  }
  while (1) {
    cout << str << endl;
    for (int j = n - 1; j > 0; j--) {
      if (str[j] <= str[j - 1]) {
        str[j]++;
        for (int k = j + 1; k < n; k++) {
          str[k] = 'a';
        }
        goto ok;
      }
    }
    return 0;
  ok:
    str;
  }
}
