#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[256], m = 0;
  string s;
  cin >> n;
  getline(cin, s);
  getline(cin, s);
  for (int i = 0; i < 200; i++) a[i] = 0;
  for (int i = 0; i < s.length(); i++) a[(int)s[i]] = 1;
  for (char i = 'a'; i <= 'z'; i++)
    if (a[i] != 0) m++;
  if (m < n)
    cout << "NO";
  else {
    cout << "YES";
    m = 0;
    for (int i = 0; i < 200; i++) a[i] = 0;
    for (int i = 0; i < s.length(); i++) {
      if (a[(int)s[i]] == 0 && m < n) {
        a[(int)s[i]] = 1;
        cout << "\n";
        m++;
      }
      cout << s[i];
    }
  }
}
