#include <bits/stdc++.h>
using namespace std;
int a[32] = {1, 1, 1, 2, 1, 2, 1, 5,  2, 2, 1, 5, 1, 2, 1, 14,
             1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51};
char ch[20];
int work(int tmp_len, int tmp_c, int len) {
  if (tmp_len > len) {
    for (int i = 1; i <= len; ++i) printf("%c", 'a' + ch[i]);
    printf("\n");
    return 0;
  }
  for (int i = 0; i <= ch[tmp_len - 1] + 1; ++i) {
    ch[tmp_len] = i;
    work(tmp_len + 1, tmp_c, len);
  }
}
int main() {
  int len;
  scanf("%d", &len);
  ch[0] = -1;
  for (int i = len; i <= len; ++i) work(1, 0, i);
}
