#include <bits/stdc++.h>
using namespace std;
int ans[100005][15];
int main() {
  int n;
  scanf("%d", &n);
  int t = 1, cnt;
  memset(ans, 0, sizeof(ans));
  for (int i = 1; i < n - 1; i++) {
    for (int j = 1; j < (1 << n); j++) {
      int mm = 0;
      for (int k = 0; k < n; k++) {
        if (j & (1 << k)) mm++;
      }
      if (mm == i) {
        t++;
        cnt = i;
        for (int k = 0; k < n; k++) {
          if (j & (1 << k)) ans[t][k + 1] = cnt, cnt--;
        }
      }
    }
  }
  if (n == 1)
    printf("%c\n", 'a');
  else {
    for (int i = 1; i <= t; i++) {
      for (int j = n; j >= 1; j--) printf("%c", ans[i][j] + 'a');
      printf("\n");
    }
    for (int i = 0; i < n; i++) printf("%c", i + 'a');
    printf("\n");
  }
}
