#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<char> alph(26);
  for (int i = 0; i < 26; i++) {
    alph[i] = ('a' + i);
  }
  bool exist = false;
  string t = "";
  for (int i = 0; i < n; i++) t += 'a';
  vector<priority_queue<string, vector<string>, greater<string>>> ans(1 << n);
  for (int bit = 0; bit < (1 << n); bit++) {
    int sum = 0;
    vector<int> flag(n, 0);
    string s = t;
    int count = 0;
    for (int i = 0; i < n; i++) {
      if (bit & (1 << i)) {
        flag[i] = 1;
        s[i] = 'b';
      }
    }
    if (count == n) continue;
    ans[bit].push(s);
  }
  vector<string> p;
  for (int i = 0; i < (1 << n); i++) {
    if (!ans[i].empty()) {
    }
    p.push_back(ans[i].top());
  }
  sort(p.begin(), p.end());
  for (int i = 0; i < p.size() / 2; i++) {
    cout << p[i] << endl;
  }
  return 0;
}
