#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int k;
  bool exist[26];
  vector<int> pos;
  while (cin >> k) {
    cin >> s;
    if (k == 1) {
      cout << "YES" << endl;
      cout << s << endl;
      continue;
    }
    memset(exist, 0, sizeof(exist));
    exist[(int)(s[0] - 'a')] = true;
    pos.clear();
    pos.push_back(0);
    int n = s.length();
    for (int i = 1; i < n; i++) {
      int j = (int)(s[i] - 'a');
      if (exist[j]) continue;
      exist[j] = true;
      pos.push_back(i);
      if (pos.size() == k) break;
    }
    if (pos.size() < k) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
      for (int i = 0; i < pos.size(); i++) {
        int start = pos[i];
        int end = (i < pos.size() - 1) ? pos[i + 1] : n;
        cout << s.substr(start, end - start) << endl;
      }
    }
  }
  return 0;
}
