#include <bits/stdc++.h>
using namespace std;
int k, l;
string s;
vector<char> ans[200];
bool c[1000];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> k >> s;
  for (int i = 0; i < s.size(); i++) {
    if (!c[s[i]] && l != k) {
      l++;
      c[s[i]] = true;
    }
    ans[l].push_back(s[i]);
  }
  if (l != k) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 1; i <= l; i++) {
    for (int j = 0; j < ans[i].size(); j++) cout << ans[i][j];
    cout << endl;
  }
  return 0;
}
