#include <bits/stdc++.h>
using namespace std;
long long n, i, sz, j;
map<char, int> m;
vector<long long> v;
vector<string> v2;
string s, ss;
int main() {
  cin >> n >> s;
  for (int i = 0; i < s.length(); i++) {
    m[s[i]]++;
    if (m[s[i]] == 1) {
      v.push_back(i);
    }
  }
  if (v.size() < n) {
    cout << "NO" << endl;
    return 0;
  }
  vector<string> v2;
  for (int i = 0; i < n; i++) {
    string ss;
    if (i != n - 1) {
      for (int j = v[i]; j < v[i + 1]; j++) {
        ss += s[j];
      }
    } else {
      for (int j = v[i]; j < s.size(); j++) {
        ss += s[j];
      }
    }
    v2.push_back(ss);
  }
  cout << "YES" << endl;
  for (int i = 0; i < v2.size(); i++) {
    cout << v2[i] << endl;
  }
  return 0;
}
