#include <bits/stdc++.h>
using namespace std;
int main() {
  int k, i, j;
  char q[103];
  int fr[255], indx[103], ndx = 0;
  for (i = 0; i < 200; i++) fr[i] = 0;
  cin >> k;
  cin >> q;
  for (i = 0; i < strlen(q); i++)
    if (ndx < k && (!fr[((int)q[i])])) {
      fr[((int)q[i])] = 1;
      indx[++ndx] = i;
    }
  if (ndx == k) {
    cout << "YES\n";
    for (i = 1; i <= ndx - 1; i++) {
      for (j = indx[i]; j < indx[i + 1]; j++) cout << q[j];
      cout << "\n";
    }
    for (j = indx[ndx]; j < strlen(q); j++) cout << q[j];
  } else
    cout << "NO";
  return 0;
}
