#include <bits/stdc++.h>
using namespace std;
int main() {
  ifstream ff("file.txt");
  int k;
  cin >> k;
  string s1;
  cin >> s1;
  s1 += '+';
  set<char> s;
  set<char>::iterator p;
  int len = s1.length();
  if (len < k) {
    cout << "NO" << endl;
    return 0;
  }
  int kol = 0;
  vector<string> vs;
  string s2 = "";
  for (int i = 0; i < len; i++) {
    if (i == 0) {
      s2 += s1[0];
      s.insert(s1[0]);
      continue;
    }
    p = s.find(s1[i]);
    if (p != s.end()) {
      s2 += s1[i];
    } else {
      vs.push_back(s2);
      s.insert(s1[i]);
      s2 = "";
      s2 += s1[i];
      kol++;
      if (kol == k) {
        cout << "YES" << endl;
        for (int j = 0; j < vs.size(); j++) {
          if (j != vs.size() - 1) {
            cout << vs[j] << endl;
          } else {
            cout << vs[j];
            for (int i1 = i; i1 < len; i1++) {
              if (s1[i1] != '+') {
                cout << s1[i1];
              }
            }
          }
        }
        return 0;
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}
