#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long INF = 1LL << 60;
template <typename T>
T beki(T x, long long n) {
  T res = 1;
  while (n > 0) {
    if (n & 1) res *= x;
    x = x * x;
    n >>= 1;
  }
  return res;
}
int main() {
  int N;
  cin >> N;
  queue<string> a;
  int counter = 1;
  a.push("aa");
  a.push("ab");
  int limit = beki(2, N) - 2;
  while (counter <= limit) {
    string s = a.front();
    a.pop();
    int ssize = s.size();
    string s1, s2;
    char c1, c2;
    c1 = s.at(ssize - 1);
    c2 = s.at(ssize - 1) + 1;
    s1 = s + c1;
    s2 = s + c2;
    a.push(s1);
    a.push(s2);
    counter++;
  }
  while (a.size()) {
    cout << a.front() << endl;
    a.pop();
  }
}
