#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, b[1000] = {}, k = 0, l, c[1000] = {}, f = 0;
  long long s;
  scanf("%d", &n);
  string a;
  cin >> a;
  l = a.length();
  for (i = 0; i < l; i++) {
    if (b[a[i] - 97] == 0) {
      b[a[i] - 97] = 1;
      c[k++] = i;
    }
  }
  if (k >= n) {
    printf("YES\n");
    f = 1;
  } else
    printf("NO\n");
  if (f == 1) {
    i = 1;
    int j = 0;
    while (i < n) {
      while (j < c[i]) {
        printf("%c", a[j]);
        j++;
      }
      i++;
      printf("\n");
    }
    while (j < l) {
      printf("%c", a[j]);
      j++;
    }
    printf("\n");
  }
  return 0;
}
