#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
bool sametype(string s, string t) {
  bool ret = true;
  for (int i = 0; i < s.size(); i++) {
    for (int j = 0; j < i + 1; j++) {
      if (((s[i] != s[j]) || (t[i] != t[j])) &&
          ((s[i] == s[j]) || (t[i] == t[j]))) {
        ret = false;
      }
    }
  }
  return ret;
}
int main() {
  int n;
  cin >> n;
  string s;
  for (int i = 0; i < n; i++) {
    s += "a";
  }
  for (int bit = 0; bit < (1 << n - 1); bit++) {
    string t = s;
    for (int i = 0; i < n; i++) {
      if ((bit & (1 << i))) t[i] = 'b';
    }
    reverse(t.begin(), t.end());
    cout << t << endl;
  }
}
