#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  string str;
  cin >> str;
  int hash[26] = {0};
  int cnt = 0;
  int i;
  vector<int> pos;
  for (i = 0; i < str.size(); i++) {
    if (hash[str[i] - 'a'] == 0) {
      hash[str[i] - 'a']++;
      cnt++;
      pos.push_back(i);
    }
    if (cnt == k) {
      break;
    }
  }
  if (cnt < k) {
    cout << "NO";
  } else {
    cout << "YES" << endl;
    for (i = 0; i < pos.size() - 1; i++) {
      int size = pos[i + 1] - pos[i];
      string sub = str.substr(pos[i], size);
      cout << sub << endl;
    }
    int size = str.size() - pos[i];
    string sub = str.substr(pos[i], size);
    cout << sub;
  }
  return 0;
}
