#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vll = vector<ll>;
string yorn(bool a) {
  if (a) return "Yes";
  return "No";
}
string YorN(bool a) {
  if (a) return "YES";
  return "NO";
}
ll gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void mysort(vector<string> &a) { sort(a.begin(), a.end()); }
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << 'a' << endl;
    return 0;
  }
  vector<string> str;
  for (int i = 0; i < (1 << (n - 1)); i++) {
    string s;
    s += 'a';
    bitset<14> bit(i);
    for (int i = 0; i < n - 1; i++) {
      if (bit[i])
        s += 'b';
      else
        s += 'a';
    }
    str.push_back(s);
  }
  mysort(str);
  for (auto i : str) cout << i << endl;
}
