#include <bits/stdc++.h>
using namespace std;
bool charA[1000];
int main() {
  ios::sync_with_stdio(false);
  int k;
  string s;
  cin >> k >> s;
  int i;
  charA[s[0]] = 1;
  string ans[110];
  ans[0].push_back(s[0]);
  int ans_k = 0;
  for (i = 1; i < s.size(); i++) {
    if (charA[s[i]] != 1 && ans_k + 1 < k) {
      ans_k++;
      charA[s[i]] = 1;
      ans[ans_k].push_back(s[i]);
    } else {
      ans[ans_k].push_back(s[i]);
    }
  }
  if (ans_k + 1 < k)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (i = 0; i <= ans_k; i++) {
      cout << ans[i] << endl;
    }
  }
  return 0;
}
