#include <bits/stdc++.h>
using namespace std;
int main() {
  map<char, int> mp;
  string s;
  int i, j, n, off;
  cin >> n >> s;
  for (i = 0; i < s.size(); i++) {
    mp[s[i]] = 1;
  }
  int max = mp.size();
  if (n > max) {
    cout << "NO";
  } else {
    int c = 0;
    cout << "YES" << endl;
    for (i = 0; i < s.size(); i++) {
      if (mp[s[i]] == 1 && c < n - 1) {
        mp[s[i]] = 0;
        c++;
        j = i;
        while (mp[s[j++]] == 0) {
          cout << s[i];
          i = j;
        }
        i--;
        cout << endl;
      } else {
        cout << s[i];
      }
    }
  }
  return 0;
}
