#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
void ff() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
}
void in_out_txt() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
void print(string str) {
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == '?')
      cout << 'A';
    else
      cout << str[i];
  }
  cout << endl;
  return;
}
int main() {
  ff();
  int k;
  string str;
  cin >> k >> str;
  if (str.size() < k) {
    cout << "NO" << endl;
    return 0;
  }
  int arr[26];
  memset(arr, 0, sizeof arr);
  vector<string> vec;
  string st = str.substr(0, 1);
  arr[str[0] - 'a'] = 1;
  for (int i = 1; i < str.size(); i++) {
    if (arr[str[i] - 'a'] == 1)
      st += str[i];
    else {
      vec.push_back(st);
      st = str.substr(i, 1);
      arr[str[i] - 'a'] = 1;
    }
  }
  if (st != "") vec.push_back(st);
  if (vec.size() < k)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 0; i < k; i++) {
      if (i + 1 == k) {
        st = "";
        for (int j = i; j < vec.size(); j++) st += vec[j];
        cout << st << endl;
      } else
        cout << vec[i] << endl;
    }
  }
  return 0;
}
