#include <bits/stdc++.h>
int main() {
  char str[101];
  int n, i, cn[26] = {0}, br[101] = {0}, cnt = 0, prin = 0;
  scanf("%d", &n);
  scanf("%s", &str);
  for (i = 0; str[i] != '\0'; i++) {
    if (!cn[str[i] - 'a']) {
      cn[str[i] - 'a']++;
      br[i] = 1;
      cnt++;
    }
  }
  if (n > cnt) {
    printf("NO\n");
  } else {
    printf("YES\n");
    putchar(str[0]);
    prin++;
    for (i = 1; str[i] != '\0'; i++) {
      if (prin < n) {
        if (br[i]) {
          putchar('\n');
          putchar(str[i]);
          prin++;
        } else
          putchar(str[i]);
      } else
        putchar(str[i]);
    }
    putchar('\n');
  }
  return 0;
}
