#include <bits/stdc++.h>
using namespace std;
void my_dbg() { cout << endl; }
template <typename Arg, typename... Args>
void my_dbg(Arg A, Args... B) {
  cout << ' ' << A;
  my_dbg(B...);
}
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
const int inf = INT_MAX;
const int ninf = INT_MIN;
const int mod = 1e9 + 7;
const int N = 2e5 + 2;
void solve() {
  int n;
  scanf("%d", &n);
  set<string> normal;
  int len = 0;
  normal.insert(string(n, 'a'));
  while (len < n) {
    len++;
    for (int i = 1; i + len - 1 < n; i++) {
      string here =
          string(i, 'a') + string(len, 'b') + string(n - i - len, 'a');
      normal.insert(here);
    }
  }
  for (auto i : normal) cout << i << '\n';
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
