#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using P = pair<ll, ll>;
template <class T>
using V = vector<T>;
int main() {
  int n;
  cin >> n;
  string ans = "";
  for (int i = 0; i < (n); ++i) ans += "a";
  if (n == 1) {
    cout << ans << endl;
    return 0;
  }
  auto move_up = [&]() {
    while (true) {
      bool ok = true;
      for (int i = n - 1; i > 0; i--) {
        if (ans[i] - ans[i - 1] > 1) {
          if (i == 1) return true;
          ans[i - 1]++;
          for (int j = i; j < n; j++) ans[j] = 'a';
          ok = false;
        }
      }
      if (ok) break;
    }
    return false;
  };
  while (true) {
    cout << ans << endl;
    ans[n - 1]++;
    bool fin = move_up();
    if (fin) break;
  }
}
