#include <bits/stdc++.h>
int mp[26];
int check(char a) {
  if (mp[a - 'a'] == 0)
    return (1);
  else
    return (0);
}
int main() {
  char str[1005], result[1005];
  int i, j, k, l, res, count = 0, mp1[26] = {0};
  scanf("%d", &k);
  scanf("%s", str);
  l = strlen(str);
  for (i = 0; i < l; i++) {
    if (mp1[str[i] - 'a'] == 0) {
      count++;
      mp1[str[i] - 'a'] = 1;
    }
  }
  if (count < k) {
    printf("NO\n");
    return (0);
  }
  printf("YES\n");
  j = 0;
  for (i = 0; i < l; i++) {
    res = check(str[i]);
    if (res == 1) {
      if (i != 0) {
        result[j] = '\0';
        printf("%s\n", result);
        k--;
      }
      j = 0;
      mp[str[i] - 'a'] = 1;
    }
    if (k == 1) break;
    result[j++] = str[i];
  }
  for (int k = i; k < l; k++) {
    result[j++] = str[k];
  }
  result[j] = '\0';
  printf("%s\n", result);
  return (0);
}
