#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  scanf("%d", &k);
  set<char> s;
  string p;
  cin >> p;
  int l = p.length();
  int i;
  for (i = 0; i < l; i++) s.insert(p[i]);
  if (s.size() < k)
    cout << "NO" << endl;
  else {
    cout << "YES";
    int A[27];
    int q = 0;
    memset(A, 0, sizeof A);
    for (i = 0; i < l; i++) {
      if ((A[int(p[i]) - 97] == 0) && (q < k)) {
        A[int(p[i]) - 97] = 1;
        cout << endl;
        cout << p[i];
        q++;
      } else {
        cout << p[i];
      }
    }
  }
}
