#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios_base::sync_with_stdio(false);
  int k;
  string str;
  cin >> k;
  cin >> str;
  int freq[123] = {0};
  int len = str.length();
  for (int i = 0; i < len; i++) {
    freq[str[i]] = 1;
  }
  int count = 0;
  for (int i = 97; i <= 122; i++) {
    if (freq[i] == 1) count++;
  }
  if (count < k)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    count = 0;
    cout << str[0];
    freq[str[0]] = 0;
    for (int i = 1; i < len; i++) {
      if (freq[str[i]] == 1 && count < k - 1) {
        cout << endl;
        freq[str[i]] = 0;
        cout << str[i];
        count++;
      } else
        cout << str[i];
    }
  }
  return 0;
}
