#include <bits/stdc++.h>
using namespace std;
int n;
string second, t;
int main() {
  cin >> n;
  for (long long i = (long long)1; i <= (long long)n; i++) second += 'a';
  for (long long i = (long long)0; i <= (long long)(1 << (n - 1)) - 1; i++) {
    t = second;
    for (long long j = (long long)0; j <= (long long)n - 1; j++)
      if ((1 << j) & i) t[j] = 'b';
    reverse(t.begin(), t.end());
    cout << t << "\n";
  }
}
