#include <bits/stdc++.h>
using namespace std;
int k, i, diff[30], num;
string beautiful;
int main() {
  cin >> k >> beautiful;
  for (; i < beautiful.length(); ++i)
    if (diff[beautiful[i]] == 0) {
      diff[beautiful[i]] = 1;
      ++num;
    }
  if (num < k)
    cout << "NO";
  else {
    cout << "YES";
    for (i = 0; i < beautiful.length(); ++i)
      if (diff[beautiful[i]] == 1 && k > 0) {
        --k;
        diff[beautiful[i]] = 0;
        cout << endl << beautiful[i];
      } else
        cout << beautiful[i];
  }
  return 0;
}
