#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[26] = {0};
  int no;
  int pos[26] = {0};
  char str[101];
  cin >> no;
  cin >> str;
  int k = 0;
  for (int i = 0; str[i] != '\0'; i++) {
    if (a[int(str[i] - 97)] == 0) {
      a[int(str[i] - 97)] = 1;
      pos[k] = i;
      k++;
    }
  }
  if (k >= no) {
    cout << "YES\n";
    for (int j = 0; j < (no - 1); j++) {
      for (int l = pos[j]; l < pos[j + 1]; l++) cout << str[l];
      if (j != (no - 1)) cout << "\n";
    }
    for (int l = pos[no - 1]; l < strlen(str); l++) cout << str[l];
    cout << "\n";
  } else
    cout << "NO\n";
  return 0;
}
