#include <bits/stdc++.h>
using namespace std;
char c[10] = {'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a'};
char d[10];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int f = pow(2, n - 1) - 1;
  for (int i = 0; i < n; i++) cout << c[i];
  cout << endl;
  memcpy(c, d, strlen(d));
  while (f) {
    memcpy(c, d, strlen(d));
    for (int k = 1; k <= f; k++) {
      memcpy(d, c, strlen(c));
      for (int i = k - 1; i >= 0; i--) {
        if ((k >> i) & 1) {
          d[i] += 1;
        }
      }
      for (int i = n - 1; i >= 0; i--) {
        cout << d[i];
      }
      cout << endl;
    }
    f = f / 2;
  }
  return 0;
}
