#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int main() {
  int N;
  cin >> N;
  set<string> s_set;
  for (int bit = 0; bit < (1 << N); bit += 2) {
    string S = "";
    for (int i = 0; i < N; ++i) {
      if (bit & (1 << i)) {
        S += 'b';
      } else {
        S += 'a';
      }
      s_set.insert(S);
    }
  }
  for (auto s_ : s_set) {
    if (s_.size() == N) cout << s_ << "\n";
  }
}
