#include <bits/stdc++.h>
using namespace std;
long long n;
void solve(long long len, string s) {
  if (len == n + 1) {
    cout << s << "\n";
    return;
  }
  for (char ch = 'a'; ch <= 'b'; ch++) {
    solve(len + 1, s + ch);
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  solve(2, "a");
}
