#include <bits/stdc++.h>
using namespace std;
using u32 = uint32_t;
using u64 = uint64_t;
using i64 = int64_t;
constexpr int MOD = 998244353;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  int N;
  cin >> N;
  string s(N, 'a');
  while (true) {
    cout << s << '\n';
    auto it = s.end() - 1;
    if (it == s.begin()) {
      break;
    }
    bool end = false;
    while (++*it - *(it - 1) > 1) {
      it--;
      if (it == s.begin()) {
        end = true;
        break;
      }
    }
    if (end) {
      break;
    }
    while (++it < s.end()) {
      *it = 'a';
    }
  }
}
