#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
const int INF = 1e9;
const ll LLINF = 1e18;
const ll MOD = 1e9 + 7;
const double EPS = 1e-10;
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 main() {
  int n;
  cin >> n;
  vector<string> v;
  for (int bit = 0; bit < (1 << (n - 1)); bit++) {
    string s = "a";
    for (int i = 0; i < (n - 1); i++) {
      if (bit & (1 << i))
        s += 'b';
      else
        s += 'a';
    }
    v.push_back(s);
  }
  sort(v.begin(), v.end());
  for (auto x : v) cout << x << endl;
}
