#include <bits/stdc++.h>
using namespace std;
int k;
string q;
int vis[256];
int main(void) {
  cin >> k;
  cin >> q;
  vector<string> ans;
  int curr = k;
  for (int i = 0; i < q.size(); ++i) {
    if (!vis[q[i]] && curr > 0) {
      vis[q[i]] = 1;
      string tmp;
      tmp += q[i];
      ans.push_back(tmp);
      curr--;
    } else {
      ans.back() += q[i];
    }
  }
  if (curr == 0) {
    cout << "YES\n";
    for (int i = 0; i < ans.size(); ++i) {
      cout << ans[i] << "\n";
    }
  } else {
    cout << "NO\n";
  }
  return 0;
}
