#include <bits/stdc++.h>
using namespace std;
int digit(int t, int dig) {
  while (dig) {
    t /= 10;
    dig--;
  }
  return t % 10;
}
int main() {
  int n;
  cin >> n;
  vector<char> a = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'};
  vector<int> ans(n);
  vector<int> w(n);
  for (int i = 0; i < (n); ++i) w[i] = i;
  do {
    for (int i = 0; i < (n); ++i) {
      cout << a[ans[i]];
    }
    cout << endl;
    int k = 1;
    while (1) {
      int mx = -1;
      for (int i = 0; i < (n - k); ++i) {
        mx = max(mx, ans[i]);
      }
      if (ans[n - k] <= mx) {
        ans[n - k]++;
        break;
      } else {
        ans[n - k] = 0;
        k++;
      }
    }
  } while (ans != w);
  for (int i = 0; i < (n); ++i) {
    cout << a[ans[i]];
  }
  cout << endl;
  return 0;
}
