#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t N;
  cin >> N;
  const int64_t MAX = (1LL << (N - 1));
  vector<string> ans;
  for (int64_t i = 0; i < MAX; i++) {
    string curr = "a";
    for (int64_t j = 0; j < N - 1; j++) {
      curr.push_back((i >> j) % 2 == 0 ? 'a' : 'b');
    }
    ans.push_back(curr);
  }
  sort(ans.begin(), ans.end());
  for (const string& s : ans) {
    cout << s << endl;
  }
}
