#include <bits/stdc++.h>
using namespace std;
int a[26];
int pos[100 + 10];
int main() {
  int k;
  cin >> k;
  string q;
  cin >> q;
  int cnt = 0;
  for (int i = 0; i < q.length(); i++) {
    if (a[q[i] - 'a'] == 0) {
      a[q[i] - 'a']++;
      pos[cnt] = i;
      cnt++;
    }
  }
  if (cnt < k)
    cout << "NO";
  else {
    cout << "YES" << endl;
    for (int i = 0; i < k; i++) {
      if (i == k - 1) {
        for (int j = pos[i]; j < q.length(); j++) {
          cout << q[j];
        }
      } else {
        for (int j = pos[i]; j < pos[i + 1]; j++) {
          cout << q[j];
        }
        cout << endl;
      }
    }
  }
  return 0;
}
