#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int k;
  string s;
  cin >> k >> s;
  bool arr[26] = {0};
  int cnt = 0;
  for (int i = 0; i < s.size(); i++) {
    if (arr[s[i] - 'a'] == 0) {
      cnt++;
      arr[s[i] - 'a'] = 1;
    }
  }
  if (cnt >= k) {
    cout << "YES";
    bool arr1[26] = {0};
    cnt = 0;
    for (int i = 0; i < s.size(); i++) {
      if (arr1[s[i] - 'a'] == 0 and cnt < k) {
        cnt++;
        arr1[s[i] - 'a'] = 1;
        cout << endl << s[i];
      } else {
        cout << s[i];
      }
    }
  } else
    cout << "NO";
}
