#include <bits/stdc++.h>
using namespace std;
constexpr int MAXN = 32;
int a[MAXN], cnt, n;
string s, ans[MAXN];
int main() {
  cin >> n >> s;
  for (int i = 0; i < s.size(); i++) {
    if (!a[s[i] - 'a']) {
      if (cnt < n) cnt++;
      a[s[i] - 'a'] = 1;
      ans[cnt] += s[i];
    } else
      ans[cnt] += s[i];
  }
  if (cnt == n) {
    cout << "YES\n";
    for (int i = 1; i <= cnt; i++) cout << ans[i] << '\n';
    return false;
  }
  return cout << "NO\n", false;
}
