#include <bits/stdc++.h>
using namespace std;
int f[123];
int main() {
  int n;
  string s;
  cin >> n >> s;
  int cc = 0;
  int len = s.size();
  for (int i = 0; i < len; i++)
    if (!f[s[i]]) f[s[i]] = 1, cc++;
  if (cc < n) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n";
  for (int i = 0; i < 123; i++) f[i] = 0;
  int pr = 1;
  int x = 0;
  bool flag = false;
  for (int i = 0; i < len && pr < n; i++, x++) {
    if (flag && !f[s[i]]) {
      flag = false;
      cout << endl;
      pr++;
    }
    if (!flag && !f[s[i]]) f[s[i]] = 1, flag = true;
    cout << s[i];
  }
  while (x < len) cout << s[x++];
  return 0;
}
