#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<pair<int, int> > pr;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      pr.push_back({i, j});
    }
  }
  vector<string> res;
  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');
    }
    res.push_back(tmp);
  }
  sort(res.begin(), res.end());
  for (int i = 0; i < res.size() / 2; i++) {
    cout << res[i] << "\n";
  }
}
