#include <bits/stdc++.h>
using namespace std;
long long n, cnt = 0, a[1030];
char s[1030][15];
signed main() {
  cin >> n;
  for (long long i = 1; i <= (1 << n); i++) s[i][1] = 'a';
  while (a[0] == 0) {
    for (long long i = n; i >= 0; i--) {
      if (a[i] == 1)
        a[i] = 0;
      else {
        a[i] = 1;
        break;
      }
    }
    if (a[1] == 0) continue;
    cnt++;
    for (long long i = 2; i <= n; i++) s[cnt][i] = s[cnt][i - 1] + a[i];
  }
  for (long long i = 1; i <= cnt; i++) {
    for (long long j = 1; j <= n; j++) cout << s[i][j];
    cout << endl;
  }
  return 0;
}
