#include <bits/stdc++.h>
using namespace std;
int vis[10001];
int main() {
  int n, cnt = 0;
  cin >> n;
  string s, a;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (vis[s[i]] == 0) {
      vis[s[i]] = 1;
      cnt++;
    }
  }
  if (cnt < n) {
    cout << "NO" << endl;
  } else {
    memset(vis, 0, sizeof(vis));
    cnt = 0;
    cout << "YES" << endl;
    for (int i = 0; i < s.size(); i++) {
      if (vis[s[i]] == 0) {
        vis[s[i]] = 1;
        cnt++;
        if (cnt == n) {
          a = s.substr(i, s.size() - i);
          cout << a << endl;
          return 0;
        } else {
          while (vis[s[i]] == 1) {
            a += s[i];
            i++;
          }
          cout << a << endl;
          i--;
        }
        a.clear();
      }
    }
  }
  return 0;
}
