#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  string s;
  cin >> s;
  vector<int> diff_pos;
  map<char, int> seen;
  for (int i = 0; i < s.size(); i++) {
    if (!seen[s[i]]) {
      seen[s[i]] = 1;
      diff_pos.push_back(i);
    }
  }
  if (diff_pos.size() < k) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n";
  for (int i = 0; i < k - 1; i++) {
    cout << s.substr(diff_pos[i], diff_pos[i + 1] - diff_pos[i]) << '\n';
  }
  cout << s.substr(diff_pos[k - 1], s.size() - diff_pos[k - 1]);
  return 0;
}
