#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
constexpr char ln = '\n';
constexpr long long MOD = 1000000007LL;
constexpr long long INF = 1000000009LL;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int n;
void func(string s) {
  if (s.size() == n) {
    cout << s << ln;
    return;
  }
  for (int i = 0; i < (2); i++) {
    s.push_back(s.back() + i);
    func(s);
    s.pop_back();
  }
}
int main() {
  cin >> n;
  func("a");
}
