#include <bits/stdc++.h>
using namespace std;
int v[26];
int main() {
  int k;
  cin >> k;
  string s, t = "";
  cin >> s;
  t = s[0];
  v[s[0] - '0'] = 1;
  vector<string> ans;
  for (int i = 1; i < (int)s.size(); ++i) {
    if (!v[s[i] - '0']) {
      ans.push_back(t);
      t = s[i];
      v[s[i] - '0'] = 1;
    } else
      t += s[i];
  }
  ans.push_back(t);
  if ((int)ans.size() < k)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = k; i < (int)ans.size(); ++i) {
      ans[k - 1] += ans[i];
    }
    for (int i = 0; i < k; ++i) {
      cout << ans[i] << endl;
    }
  }
  return 0;
}
