#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T, class U>
using P = pair<T, U>;
template <class T>
using vec = vector<T>;
template <class T>
using vvec = vector<vec<T>>;
int main() {
  vec<string> ans = {"a", "b", "c", "d", "e", "f",
                     "g", "h", "i", "j", "k", "l"};
  int n;
  cin >> n;
  vec<set<vec<int>>> dp(n);
  dp[0].insert(vec<int>(1, 0));
  for (int(i) = 0; (i) < (n - 1); (i)++) {
    set<vec<int>> kon = dp[i];
    set<vec<int>>::iterator it;
    for (it = kon.begin(); it != kon.end(); ++it) {
      vec<int> val = *it;
      for (int(j) = 0; (j) < (i + 2); (j)++) {
        vec<int> tmp;
        tmp.push_back(0);
        int target;
        if (j == i + 1)
          target = -1;
        else
          target = val[j];
        for (int(k) = 0; (k) < (i + 1); (k)++) {
          if (val[k] == target)
            tmp.push_back(0);
          else
            tmp.push_back(val[k] + 1);
        }
        dp[i + 1].insert(tmp);
      }
    }
  }
  set<vec<int>>::iterator it2;
  for (it2 = dp[n - 1].begin(); it2 != dp[n - 1].end(); ++it2) {
    for (int(i) = 0; (i) < (n); (i)++) cout << ans[(*it2)[i]];
    cout << endl;
  }
}
