#include <bits/stdc++.h>
using namespace std;
int aa[27], bb[1000];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k = 0, i;
  cin >> n;
  string s;
  cin >> s;
  if (n == 1) {
    cout << "YES" << endl;
    cout << s << endl;
    return 0;
  }
  for (int i = 0; i < s.size(); i++) {
    aa[s[i] - 'a']++;
    if (aa[s[i] - 'a'] == 1) k++;
  }
  if (k < n)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    int p = 0;
    for (int i = 0; i < s.size(); i++) {
      if (!bb[s[i]] && p < n) {
        cout << endl;
        bb[s[i]] = 1;
        p++;
      }
      cout << s[i];
    }
  }
  return 0;
}
