#include <bits/stdc++.h>
using namespace std;
bool check[300];
int main() {
  int k;
  string str;
  cin >> k >> str;
  int len = str.length();
  int cnt = 0;
  for (int i = 0; i < len; i++) {
    if (check[str[i]] == 0) {
      check[str[i]] = true;
      cnt++;
    }
  }
  memset(check, 0, sizeof(check));
  bool flag = true;
  if (cnt >= k) {
    cout << "YES" << endl;
    int ss = 1;
    for (int i = 0; i < len; i++) {
      if (check[str[i]] == 0) {
        check[str[i]] = true;
        if (!flag and ss < k) {
          cout << endl;
          ss++;
        }
        flag = false;
      }
      cout << str[i];
    }
    cout << endl;
  } else
    cout << "NO" << endl;
  return 0;
}
