#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int l = 1 << (n - 1);
  for (register int i = (0); i < (l); i++) {
    unsigned k = i;
    putchar('a');
    char now = 'a';
    for (register int i = (n - 2); i >= (0); i--) {
      if ((k >> i) & 1) now++;
      putchar(now);
    }
    putchar('\n');
  }
}
