#include <bits/stdc++.h>
using namespace std;
string second, s1[12345];
int n, c, j;
map<char, bool> mp;
set<char> ss;
int main() {
  cin >> n >> second;
  if (second.size() < n) {
    cout << "NO";
    return 0;
  }
  for (int i = 0; i < second.size(); ++i) {
    ss.insert(second[i]);
  }
  if (n > ss.size()) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  cout << second[0];
  mp[second[0]] = true;
  for (int i = 1; i < second.size(); ++i) {
    if (second[i] == second[i - 1]) {
      cout << second[i];
    } else if (c < n) {
      if (c == n - 1) {
        cout << second[i];
      } else if (mp[second[i]] == false) {
        cout << endl;
        c++;
        cout << second[i];
        mp[second[i]] = true;
      } else {
        cout << second[i];
      }
    }
  }
}
