#include <bits/stdc++.h>
using namespace std;
void READ(vector<long long> &v, long long n) {
  long long a;
  for (long long i = 0; i < n; i = i + 1) {
    cin >> a;
    v.push_back(a);
  }
}
void PRINT(vector<long long> &v, long long a = 0) {
  for (long long i = a; i < v.size(); i = i + 1) {
    cout << v[i] << " ";
  }
  cout << "\n";
}
double logy(long long n, long long b) {
  if (b == 0) {
    return (-1);
  }
  if (n == 1) {
    return (0);
  }
  return ((double)log10(n) / log10(b));
}
long long power(long long k, long long n, long long m = 1000000007) {
  long long res = 1;
  while (n) {
    if (n % 2 != 0) {
      res = (res * k) % m;
    }
    k = (k * k) % m;
    n = n / 2;
  }
  return (res);
}
long long dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
long long dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
vector<pair<long long, long long> > dr;
void call() {
  dr.push_back(make_pair(1, 0));
  dr.push_back(make_pair(-1, 0));
  dr.push_back(make_pair(0, 1));
  dr.push_back(make_pair(0, -1));
}
long long n, m, k;
bool ok = false;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  std::cout.unsetf(std::ios::floatfield);
  std::cout.precision((long long)12);
  long long a, b, c, d, i, j, t, x, y, z;
  long long p, q, r, u, w;
  char ch, chr;
  string str, st, str1, str2, str3, str4;
  cin >> k >> str;
  if ((long long)(str).size() < k) {
    cout << "NO";
  } else {
    vector<long long> arr(26, 0);
    n = (long long)(str).size();
    for (i = 0; i < n; i++) {
      arr[str[i] - 'a']++;
    }
    x = 0;
    for (i = 0; i < 26; i++) {
      if (arr[i]) {
        x++;
      }
      arr[i] = 0;
    }
    if (x < k) {
      cout << "NO";
      exit(0);
    }
    a = 0;
    cout << "YES";
    for (i = 0; i < n; i++) {
      if (a != k && arr[str[i] - 'a'] == 0) {
        a++;
        cout << "\n" << str[i];
        arr[str[i] - 'a']++;
      } else {
        cout << str[i];
      }
    }
  }
}
