#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const int maxn = 505 * 1001;
const int Base = 199;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string q;
  int n;
  cin >> n;
  cin >> q;
  set<char> ch;
  for (int i = 0; i < q.size(); i++) ch.insert(q[i]);
  if (ch.size() < n)
    return cout << "NO", 0;
  else {
    set<char> used;
    int t = 0, pos = 0;
    cout << "YES";
    while (pos < q.size()) {
      if (t < n && used.find(q[pos]) == used.end()) {
        used.insert(q[pos]);
        cout << endl << q[pos];
        t++;
        pos++;
        continue;
      }
      cout << q[pos];
      pos++;
    }
  }
  return 0;
}
