#include <bits/stdc++.h>
using namespace std;
long long int pow(long long int x, long long int y, long long int m) {
  long long int res = 1;
  x = x % m;
  while (y > 0) {
    if (y & 1) res = ((res % m) * (x % m)) % m;
    y = y >> 1;
    x = ((x % m) * (x % m)) % m;
  }
  return res % m;
}
template <typename Arg1>
void ZZ(const char* name, Arg1&& arg1) {
  std::cerr << name << " = " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void ZZ(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  std::cerr.write(names, comma - names) << " = " << arg1;
  ZZ(comma, args...);
}
const long long int INF = 0xFFFFFFFFFFFFFFFL;
clock_t time_p = clock();
void abhigyan10() {
  time_p = clock() - time_p;
  cerr << "Time Taken : " << (float)(time_p) / CLOCKS_PER_SEC << "\n";
}
long long int seed;
mt19937 rng(seed = chrono::steady_clock::now().time_since_epoch().count());
inline long long int rnd(long long int l = 0, long long int r = INF) {
  return uniform_int_distribution<long long int>(l, r)(rng);
}
const long long int mod = 1000000007;
int no_of_characters(int M) {
  int k = 1;
  while (true) {
    if (pow(2, k + 1) - 2 < M)
      k++;
    else
      break;
  }
  return k;
}
void print_string(int M) {
  int k, num, N;
  k = no_of_characters(M);
  N = M - (pow(2, k) - 2);
  while (k > 0) {
    num = pow(2, k - 1);
    if (num >= N)
      cout << "a";
    else {
      cout << "b";
      N -= num;
    }
    k--;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, i, j;
  cin >> n;
  string s = "", temp;
  for (i = 0; i < n; i++) s += 'a';
  cout << s << "\n";
  for (i = n - 1; i >= 1; i--) {
    temp = s;
    temp[i] = 'b';
    string temp2 = temp.substr(0, i + 1);
    cout << temp << "\n";
    for (j = pow(2, n - i - 1); j < pow(2, n - i) - 1; j++) {
      cout << temp2;
      print_string(j);
      cout << "\n";
    }
  }
  return 0;
}
