#include <bits/stdc++.h>
using namespace std;
char arr[26];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  int n;
  cin >> n;
  string s;
  cin >> s;
  if (n == 1) {
    cout << "YES\n" << s << endl;
    return 0;
  }
  for (int i = 0; i < s.size(); i++) arr[s[i] - 'a'] = 1;
  int cnt = 0;
  for (int i = 0; i < 26; i++)
    if (arr[i]) cnt++;
  if (cnt < n) {
    cout << "NO" << endl;
    return 0;
  }
  int cr = 0;
  int prev = 0;
  cout << "YES" << endl;
  for (int i = 1; i < s.size(); i++) {
    bool f = true;
    for (int j = 0; j < i; j++)
      if (s[j] == s[i]) f = false;
    if (f) {
      if (++cr == n) {
        cout << s.substr(prev, s.size() - prev) << endl;
        return 0;
      }
      cout << s.substr(prev, i - prev) << endl;
      if (i == s.size() - 1) {
        cout << s[i] << endl;
        return 0;
      }
      prev = i;
      if (cr == n - 1) {
        cout << s.substr(prev, s.size() - prev) << endl;
        return 0;
      }
    }
  }
  return 0;
}
