#include <bits/stdc++.h>
using namespace std;
bool used[256];
int pos[26];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int k;
  cin >> k;
  string s;
  cin >> s;
  int j = 0;
  for (unsigned i = 0; i < s.size(); ++i) {
    if (!used[s[i]]) {
      used[s[i]] = true;
      pos[j++] = i;
      if (j == k) break;
    }
  }
  pos[j] = s.size();
  if (j < k) {
    cout << "NO\n";
    return 0;
  }
  cout << "YES\n";
  for (int i = 0; i < k; ++i) {
    cout << s.substr(pos[i], pos[i + 1] - pos[i]) << "\n";
  }
  return 0;
}
