#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  char a[105];
  int b[26], n, i, j, k, flag, cnt;
  for (i = 0; i < 26; i++) b[i] = -1;
  cin >> n;
  cnt = n - 1;
  cin >> a;
  int l = strlen(a);
  if (n == 1) {
    cout << "YES\n";
    for (i = 0; i < l; i++) cout << a[i];
    cout << endl;
  } else if (n > l) {
    cout << "NO\n";
  } else {
    b[0] = 0;
    j = 1;
    for (i = 1; i < l && cnt; i++) {
      flag = 0;
      for (k = 0; k < j; k++) {
        if (a[i] == a[b[k]]) {
          flag = 1;
          break;
        }
      }
      if (!flag) {
        b[j++] = i;
        cnt--;
      }
    }
    if (cnt)
      cout << "NO\n";
    else {
      cout << "YES\n";
      for (i = 0; i < j - 1; i++) {
        for (k = b[i]; k < b[i + 1]; k++) cout << a[k];
        cout << endl;
      }
      for (i = b[j - 1]; i < l; i++) cout << a[i];
      cout << endl;
    }
  }
  return 0;
}
