#include <bits/stdc++.h>
using namespace std;
int main() {
  string st;
  int k, n;
  cin >> k;
  cin >> st;
  n = st.size();
  st = " " + st;
  vector<string> ans;
  bool fre[26];
  string cur(1, st[1]);
  memset(fre, true, sizeof fre);
  fre[st[1] - 'a'] = false;
  for (int i = 2; i <= n; ++i) {
    if (fre[st[i] - 'a']) {
      ans.push_back(cur);
      cur = st[i];
      fre[st[i] - 'a'] = false;
    } else
      cur += st[i];
  }
  ans.push_back(cur);
  if (ans.size() < k)
    cout << "NO";
  else {
    cout << "YES\n";
    for (int i = 0; i < k - 1; ++i) cout << ans[i] << "\n";
    for (int i = k - 1; i < ans.size(); ++i) cout << ans[i];
  }
  return 0;
}
