#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int k;
  string s;
  cin >> k >> s;
  vector<char> tot;
  vector<int> ind;
  for (int i = 0; i < s.length(); ++i) {
    bool there = true;
    for (int j = 0; j < tot.size(); ++j) {
      if (s[i] == tot[j]) there = false;
    }
    if (there) {
      tot.push_back(s[i]);
      ind.push_back(i);
    }
  }
  if (tot.size() < k)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 0; i < k - 1; ++i) {
      cout << s.substr(ind[i], ind[i + 1] - ind[i]) << endl;
    }
    cout << s.substr(ind[k - 1], s.length() - ind[k - 1]) << endl;
  }
  return 0;
}
