#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> res;
  for (int(i) = 0; (i) < (pow(2, n - 1)); ++(i)) {
    string s = "a";
    for (int(j) = 0; (j) < (n - 1); ++(j)) {
      if (i & (1 << j))
        s += "b";
      else
        s += "a";
    }
    res.push_back(s);
  }
  sort(res.begin(), res.end());
  for (string x : res) cout << x << endl;
}
