#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long inf = 5e18;
void dfs(long long n, string s) {
  if (n == 0) {
    cout << s << endl;
  } else {
    for (long long i = 0; i < 2; i++) {
      char tmp = s[s.size() - 1] + i;
      dfs(n - 1, s + tmp);
    }
  }
}
int main() {
  long long n;
  cin >> n;
  string s = "a";
  dfs(n - 1, s);
}
