#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int cn = 1;
  vector<int> a(n, 0);
  while (1) {
    bool ok = true;
    int c = a[0];
    for (int i = 0; i < n; i++) {
      if (a[i] == c + 1) {
        c = a[i];
      } else if (a[i] > c + 1) {
        a[i] = 1;
        a[i - 1]++;
        ok = false;
      }
    }
    if (a[0] != 0) break;
    if (ok) {
      for (int i = 0; i < n; i++) cout << ((char)('a' + a[i]));
      cout << endl;
      a[n - 1]++;
    }
  }
  return 0;
}
