#include <bits/stdc++.h>
const long long int mod = 1e9 + 7;
const long long int inf = 1e14;
const double pi = 3.1415926536;
using namespace std;
using namespace std::chrono;
long long int biExp(long long int a, long long int b) {
  if (b == 0) return 1;
  if (b % 2 == 1)
    return (a * biExp(a, b - 1)) % mod;
  else {
    long long int temp = biExp(a, b / 2);
    return (temp * temp) % mod;
  }
}
long long int ModularInverse(long long a) { return biExp(a, mod - 2); }
long long int power(long long int a, long long int b) {
  if (b == 0) return 1;
  if (b % 2 == 1)
    return (a * pow(a, b - 1));
  else {
    long long int temp = pow(a, b / 2);
    return (temp * temp);
  }
}
void tc() {
  long long int k;
  string str;
  cin >> k >> str;
  set<char> st;
  vector<string> vec;
  string a;
  for (auto i : str) {
    if (st.find(i) == st.end()) {
      if (a != "") vec.push_back(a);
      a.clear();
      a.push_back(i);
      st.insert(i);
    } else
      a.push_back(i);
  }
  if (a != "") vec.push_back(a);
  if (vec.size() < k) {
    cout << "NO" << endl;
    return;
  }
  cout << "YES" << endl;
  for (int i = 0; i < k - 1; i++) {
    cout << vec[i] << " ";
  }
  string temp = "";
  for (int i = k - 1; i < vec.size(); i++) temp.append(vec[i]);
  cout << temp << endl;
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  auto start = high_resolution_clock::now();
  long long int t = 1;
  while (t--) {
    tc();
  }
  auto stop = high_resolution_clock::now();
  auto duration = duration_cast<microseconds>(stop - start);
  return 0;
};
