#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 30;
const long long linf = 1LL << 62;
const int MAX = 510000;
long long dy[8] = {0, 1, 0, -1, 1, -1, 1, -1};
long long dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const double pi = acos(-1);
const double eps = 1e-7;
template <typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) {
  if (a > b) {
    a = b;
    return true;
  } else
    return false;
}
template <typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) {
  if (a < b) {
    a = b;
    return true;
  } else
    return false;
}
template <typename T1, typename T2>
inline void print2(T1 a, T2 b) {
  cout << a << " " << b << endl;
}
template <typename T1, typename T2, typename T3>
inline void print3(T1 a, T2 b, T3 c) {
  cout << a << " " << b << " " << c << endl;
}
const int mod = 1e9 + 7;
int main() {
  long long n;
  cin >> n;
  string s = "";
  for (long long i = 0; i < (n); i++) s.push_back('a');
  long long tmp = n - 1;
  while (1) {
    if (s[0] == 'b') break;
    cout << s << endl;
    if (tmp == 0) break;
    for (long long now = n - 1; now >= 0; now--) {
      if (s[now] == 'a') {
        for (long long i = (now); i < (n); i++) s[i] = 'b';
        tmp = now;
        break;
      } else {
        if (s[now] == s[now - 1]) {
          s[now]++;
          break;
        }
      }
    }
  }
}
