#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
int dy[] = {0, 0, 1, -1};
int dx[] = {
    1,
    -1,
    0,
    0,
};
template <typename T>
struct edge {
  int src, to;
  T cost;
  edge(int to, T cost) : src(-1), to(to), cost(cost) {}
  edge(int src, int to, T cost) : src(src), to(to), cost(cost) {}
  edge &operator=(const int &x) {
    to = x;
    return *this;
  }
  operator int() const { return to; }
};
template <typename T>
using Edges = vector<edge<T> >;
template <typename T>
using WeightedGraph = vector<Edges<T> >;
using UnWeightedGraph = vector<vector<int> >;
template <typename T>
using Matrix = vector<vector<T> >;
void printv(vector<long long> &V) {
  for (auto e : V) cout << e << " ";
  cout << endl;
}
vector<bool> prime_table(int n) {
  vector<bool> prime(n + 1, true);
  if (n >= 0) prime[0] = false;
  if (n >= 1) prime[1] = false;
  for (int i = 2; i * i <= n; i++) {
    if (!prime[i]) continue;
    for (int j = i + i; j <= n; j += i) {
      prime[j] = false;
    }
  }
  return prime;
}
vector<int> prime_numbers;
int main() {
  cout << fixed << setprecision(10);
  long long n;
  cin >> n;
  vector<string> arr;
  for (long long i = 0; i < 1ll << n; i++) {
    if (i & 1) continue;
    string s = "";
    for (long long j = 0; j < n; j++) {
      if (i & (1 << (j))) {
        s += 'b';
      } else {
        s += 'a';
      }
    }
    arr.push_back(s);
  }
  sort((arr).begin(), (arr).end());
  for (auto e : arr) {
    cout << e << endl;
  }
}
