#include <bits/stdc++.h>
using namespace std;
int ara[28];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  for (int q = 0; q < 28; q++) ara[q] = 1;
  int a, len, b, num = 0;
  cin >> a;
  char s[105];
  cin >> s;
  len = strlen(s);
  if (len < a)
    cout << "NO" << endl;
  else {
    for (int i = 0; i < len; i++) {
      b = s[i] - 'a';
      if (ara[b] == 1) {
        ara[b] = 0;
        num++;
      }
      if (num == a) {
        cout << "YES" << endl;
        int k = 0, tmp = 1, ct = 0;
        for (int j = 0; j <= i; j++) {
          b = s[j] - 'a';
          if (ara[b] == 0) {
            ara[b] = 1;
            ct++;
            if (ct > tmp) {
              for (k; k < j; k++) cout << s[k];
              cout << endl;
              tmp++;
              k = j;
            }
          }
        }
        for (k; k < len; k++) cout << s[k];
        cout << endl;
        break;
      }
    }
    if (num != a) cout << "NO" << endl;
  }
  return 0;
}
