#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
char s[11];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) s[i] = 'a';
  printf("%s\n", s);
  char t = 'b';
  int left = 1;
  int max = 1;
  while (1) {
    if (s[n - 1] == s[0] + n - 1) break;
    s[n - 1]++;
    for (int i = n - 1; i > left; i--) {
      if (s[i] > t) {
        s[i] = 'a';
        s[i - 1]++;
      }
    }
    if (s[left] == t) {
      left++;
    }
    if (left == n) {
      max++;
      left = max;
      t++;
    }
    printf("%s\n", s);
  }
}
