#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int bit = 0; bit < 1 << n; bit++) {
    string s;
    for (int i = 0; i < n; i++) {
      if (bit >> i & 1)
        s = "b" + s;
      else
        s = "a" + s;
    }
    if (s[0] != 'a') break;
    cout << s << endl;
  }
  return 0;
}
