#include <bits/stdc++.h>
using namespace std;
bool a[26];
int sum;
int k;
string s;
int main() {
  cin >> k;
  cin >> s;
  for (int i = 0; i < s.size(); ++i) {
    a[s[i] - 'a'] = 1;
  }
  for (int i = 0; i < 26; ++i)
    if (a[i]) sum++;
  if (sum < k)
    puts("NO");
  else {
    printf("YES");
    memset(a, 0, sizeof a);
    int ss = k;
    for (int i = 0; i < s.size(); ++i) {
      if (ss == 0) {
        for (int j = i; j < s.size(); ++j) cout << s[j];
        return 0;
      }
      if (a[s[i] - 'a'] == 0) {
        cout << endl;
        --ss;
      }
      a[s[i] - 'a'] = 1;
      cout << s[i];
    }
  }
  return 0;
}
