#include <bits/stdc++.h>
using namespace std;
static const int INF = INT_MAX;
static const long long LINF = LLONG_MAX;
static const int MIN = INT_MIN;
static const long long LMIN = LLONG_MIN;
static const int MOD = 1000000007;
static const int SIZE = 200005;
const int dx[] = {0, -1, 1, 0};
const int dy[] = {-1, 0, 0, 1};
vector<int> Div(int n) {
  vector<int> ret;
  for (int i = 1; i * i <= n; ++i) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i * i != n) ret.push_back(n / i);
    }
  }
  sort(ret.begin(), ret.end());
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<string> v;
  for (int i = 0; i < (1 << n); ++i) {
    bool f = true;
    for (int j = 0; j < i; ++j) {
      if ((i ^ j) == (1 << n) - 1) f = false;
    }
    if (f) {
      string s;
      for (int j = 0; j < n; ++j) {
        if ((i >> j) & 1)
          s += 'b';
        else
          s += 'a';
      }
      reverse(s.begin(), s.end());
      v.push_back(s);
    }
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < v.size(); ++i) {
    cout << v[i] << '\n';
  }
  return 0;
}
