#include <bits/stdc++.h>
using namespace std;
int ar[30];
int main() {
  int n;
  scanf("%d\n", &n);
  string s;
  getline(cin, s);
  vector<string> res;
  string t;
  int n2 = n;
  t.push_back(s[0]);
  ar[s[0] - 'a'] = 1;
  n2--;
  for (int i = 1; i < s.size(); i++) {
    if (n2 == 0)
      t.push_back(s[i]);
    else if (ar[s[i] - 'a'] == 0) {
      res.push_back(t);
      t.clear();
      t.push_back(s[i]);
      ar[s[i] - 'a'] = 1;
      n2--;
    } else
      t.push_back(s[i]);
  }
  if (n2 != 0)
    printf("NO\n");
  else {
    res.push_back(t);
    printf("YES\n");
    for (int i = 0; i < res.size(); i++) printf("%s\n", res[i].c_str());
  }
  return 0;
}
