#include <bits/stdc++.h>
using namespace std;
int memo[26], Count;
vector<int> ind;
int main() {
  int n;
  string x;
  cin >> n >> x;
  for (int i = 0; i < x.size(); i++)
    if (!memo[x[i] - 'a']++ && Count < n) Count++, ind.push_back(i);
  if (Count < n)
    cout << "NO" << endl, x.clear();
  else
    cout << "YES" << endl, ind.push_back(int(x.size()));
  for (int i = 0, j = 1; i < x.size(); i++)
    if (i == ind[j])
      cout << endl << x[i], j++;
    else
      cout << x[i];
}
