#include <bits/stdc++.h>
static FILE *szpFpI;
static int siCCnt;
int fOutLine(char *pcpLine) {
  char lc1Buf[1024];
  printf("%s", pcpLine);
  return 0;
}
int fSetStr(char *pcpStr, int piCCnt) {
  int i;
  if (piCCnt == siCCnt) {
    fOutLine(pcpStr);
    return 0;
  }
  for (i = 0;; i++) {
    pcpStr[piCCnt] = 'a' + i;
    if (pcpStr[piCCnt] > pcpStr[piCCnt - 1] + 1) {
      break;
    }
    fSetStr(pcpStr, piCCnt + 1);
  }
  return 0;
}
int fMain() {
  char lc1Buf[1024];
  fgets(lc1Buf, sizeof(lc1Buf), szpFpI);
  sscanf(lc1Buf, "%d", &siCCnt);
  lc1Buf[0] = 'a';
  lc1Buf[siCCnt] = '\n';
  lc1Buf[siCCnt + 1] = '\0';
  fSetStr(lc1Buf, 1);
  return 0;
}
int fOne() {
  int liRet;
  char lc1Buf[1024];
  szpFpI = stdin;
  liRet = fMain();
  return 0;
}
int main() {
  fOne();
  return 0;
}
