#include <bits/stdc++.h>
int length(char T[101]) {
  int cont = 0;
  for (; T[cont]; cont++)
    ;
  return cont;
}
int exista_pana_acum(char pana_acum[101], char c) {
  for (int i = 0; pana_acum[i]; i++) {
    if (pana_acum[i] == c) return 1;
  }
  return 0;
}
void afisaza_intre_pana_acum(char T[101], int n1, int n2) {
  for (int i = n1; i < n2 && T[i]; i++) printf("%c", T[i]);
  printf("\n");
}
int main() {
  int k;
  char T[101] = {};
  int pozitii_afisat[101] = {};
  char pana_acum[101] = {};
  scanf("%d", &k);
  scanf(" %[^\n]", T);
  int L = length(T), ultima = 0, siruri_gasite = 0, se_poate = 0;
  if (L < k) {
    printf("NO\n");
    return 0;
  } else {
    for (int i = 0;; i++) {
      if (siruri_gasite == k) {
        se_poate = 1;
        break;
      }
      if (!T[i]) break;
      if (!exista_pana_acum(pana_acum, T[i])) {
        pana_acum[siruri_gasite] = T[i];
        pozitii_afisat[siruri_gasite++] = i;
      }
    }
  }
  if (!se_poate)
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 0; i < siruri_gasite - 1; i++) {
      afisaza_intre_pana_acum(T, pozitii_afisat[i], pozitii_afisat[i + 1]);
    }
    for (int i = pozitii_afisat[siruri_gasite - 1]; T[i]; i++)
      printf("%c", T[i]);
    printf("\n");
  }
  return 0;
}
