#include <bits/stdc++.h>
using namespace std;
using i64 = int_fast64_t;
using seika = string;
template <class kizuna>
using akari = vector<kizuna>;
template <class yuzuki>
using yukari = akari<akari<yuzuki>>;
template <class tsurumaki>
using maki = akari<yukari<tsurumaki>>;
template <class kotonoha>
using akane = priority_queue<kotonoha, akari<kotonoha>, greater<kotonoha>>;
template <class kotonoha>
using aoi = priority_queue<kotonoha>;
inline void print() { cout << endl; }
template <typename First, typename... Rest>
void print(const First &first, const Rest &...rest) {
  cout << first << ' ';
  print(rest...);
}
void solve() {
  int n;
  cin >> n;
  for (int b = 0; b < 1 << (n - 1); b++) {
    seika s = "a";
    for (int i = 0; i < n - 1; i++) {
      s += char(s.back() + (b >> i & 1));
    }
    cout << s << endl;
  }
}
int main() {
  solve();
  return 0;
}
