#include <bits/stdc++.h>
using namespace std;
int k[26], t[26];
int main() {
  int n, l = 0;
  string s;
  cin >> n;
  cin >> s;
  for (int i = 0; i < s.length() && l < n; i++) {
    if (!k[s[i]]) {
      k[s[i]] = 1;
      t[l++] = i;
    }
  }
  if (l == n)
    cout << "YES";
  else {
    cout << "NO";
    return 0;
  }
  l = 0;
  for (int i = 0; i < s.length(); i++) {
    if (t[l] == i) l++, cout << endl;
    cout << s[i];
  }
  return 0;
}
