#include <bits/stdc++.h>
int dx4[] = {1, 0, -1, 0};
int dy4[] = {0, -1, 0, 1};
long long int gcd(long long int x, long long int y) {
  if (!y) return x;
  return gcd(y, x % y);
}
long long int lcm(long long int x, long long int y) {
  return x / gcd(x, y) * y;
}
void swap(long long int* x, long long int* y) {
  long long int tmp = *x;
  *x = *y;
  *y = tmp;
}
int asc_cmp(const void* X, const void* Y) {
  long long int x = *(int*)X, y = *(int*)Y;
  if (x < y)
    return -1;
  else if (x == y)
    return 0;
  else
    return 1;
}
int desc_cmp(const void* X, const void* Y) {
  long long int x = *(int*)X, y = *(int*)Y;
  if (x < y)
    return 1;
  else if (x == y)
    return 0;
  else
    return -1;
}
typedef struct pair_ {
  int x;
  int y;
} pair_t;
int pow_int(int a, int n) {
  int x = 1;
  while (n--) {
    x *= a;
  }
  return x;
}
int main() {
  int n;
  scanf("%d", &n);
  char str[20];
  for (int i = 0; i < n; i++) {
    str[i] = 'a';
  }
  str[n] = '\0';
  printf("%s\n", str);
  if (n == 1) return 0;
  for (int i = 0; i < pow_int(2, n - 1) - 1; i++) {
    for (int j = n - 1; j >= 0; j--) {
      if (str[j] == 'b') {
        str[j]--;
      } else {
        str[j]++;
        break;
      }
    }
    printf("%s\n", str);
  }
}
