#include <bits/stdc++.h>
int a[12], n;
void dfs(int t) {
  if (t == n + 1) {
    for (int i = 1; i <= n; ++i) {
      if (a[i] == 1)
        std::cout << 'a';
      else
        std::cout << 'b';
    }
    puts("");
    return;
  }
  for (int i = 1; i <= n; ++i) {
    a[t] = i;
    dfs(t + 1);
    a[t] = 0;
  }
}
int main() {
  std::cin >> n;
  a[1] = 1;
  dfs(2);
}
