#include <bits/stdc++.h>
using namespace std;
int k, a[1000], m, p[1000];
string s;
int main() {
  cin >> k >> s;
  memset(a, 0, sizeof(a));
  m = 0;
  for (int i = 0, ub = s.size(); i < ub; ++i) {
    if (!a[s[i]]) {
      ++m;
      a[s[i]] = 1;
      if (m <= k && i != 0) p[i] = 1;
    }
  }
  if (m < k) {
    puts("NO");
    return 0;
  }
  puts("YES");
  for (int i = 0, ub = s.size(); i < ub; ++i) {
    if (p[i]) puts("");
    putchar(s[i]);
  }
  return 0;
}
