#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  vector<string> tmpRes;
  for (int mask = 0; mask < (1 << n); mask++) {
    string tmp;
    for (int i = 0; i < n; i++) {
      if (mask & (1 << i))
        tmp.push_back('a');
      else
        tmp.push_back('b');
    }
    tmpRes.push_back(tmp);
  }
  set<string> res;
  for (auto si : tmpRes) {
    string tmp(n, '-');
    for (int i = 0; i < n; i++) {
      if (si[i] == 'a') tmp[i] = 'b';
      if (si[i] == 'b') tmp[i] = 'a';
    }
    if (tmp < si) continue;
    res.insert(si);
  }
  for (auto i : res) {
    cout << i << "\n";
  }
}
