#include <bits/stdc++.h>
using namespace std;
int i, j, k, n, m, a, b, c;
string s, str;
vector<int> V;
int freq[113];
int used[113];
int part(0);
int main(void) {
  cin >> k;
  cin >> s;
  n = s.size();
  int pivot = 0;
  for (int i = 0; i < n; ++i)
    if (freq[s[i] - 'a'] == 0) ++part, ++freq[s[i] - 'a'], ++used[i];
  if (part < k) return cout << "NO", 0;
  cout << "YES\n";
  for (i = 0; i < n && k > 0;) {
    if (used[i] == 1 && i < n) cout << s[i], ++i;
    while (used[i] != 1 && i < n) cout << s[i], ++i;
    --k;
    if (k) cout << "\n";
  }
  if (i < s.size())
    for (i; i < s.size(); ++i) cout << s[i];
  return 0;
}
