#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  string s;
  cin >> s;
  map<char, int> mp;
  vector<int> vec;
  for (int i = 0; i < s.size(); i++) {
    mp[s[i]]++;
    if (mp[s[i]] == 1) vec.push_back(i);
  }
  if (vec.size() < k)
    cout << "NO" << endl;
  else if (k == 1) {
    cout << "YES" << endl;
    cout << s << endl;
  } else {
    cout << "YES" << endl;
    for (int i = 1; i < k; i++) {
      int z = vec[0];
      vec.erase(vec.begin());
      int x = vec[0];
      for (int j = z; j < x; j++) cout << s[j];
      cout << endl;
    }
    int x = vec[0];
    for (int j = x; j < s.size(); j++) cout << s[j];
    cout << endl;
  }
}
