#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  string q;
  cin >> k >> q;
  int tab[26];
  for (int i = 0; i < 26; i++) tab[i] = 0;
  for (int i = 0; i < q.length(); i++) {
    int g = q[i] - 97;
    tab[g]++;
  }
  int j = 0;
  for (int i = 0; i < 26; i++)
    if (tab[i] > 0) j++;
  if (j < k) {
    cout << "NO" << endl;
    return 0;
  } else
    cout << "YES" << endl;
  int u = 0, v = 0, y = v;
  bool t[26];
  for (int i = 0; i < 26; i++) {
    t[i] = true;
  }
  while (u < k - 1) {
    y = v;
    t[q[y] - 97] = false;
    while (!t[q[v] - 97]) {
      v++;
    }
    for (int i = y; i < v; i++) cout << q[i];
    cout << endl;
    u++;
  }
  for (int i = v; i < q.length(); i++) {
    cout << q[i];
  }
  cout << endl;
  return 0;
}
