#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  char arr[100];
  cin >> n;
  cin >> arr;
  int m = strlen(arr);
  int i;
  int visited[26] = {0}, cnt = 0;
  for (i = 0; i < m; i++) {
    if ((visited[arr[i] - 97]) == 0) {
      cnt++;
      visited[arr[i] - 97] = 1;
    }
  }
  if (n > cnt) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  memset(visited, 0, sizeof(visited));
  cnt = 0;
  for (i = 0; i < m - 1; i++) {
    int f = 0;
    cout << arr[i];
    visited[arr[i] - 97] = 1;
    while (visited[arr[i + 1] - 97] == 1) {
      cout << arr[i + 1];
      i++;
      f = 1;
    }
    cnt++;
    if (cnt == n) {
      i++;
      while (i < m) {
        cout << arr[i];
        i++;
      }
    }
    cout << endl;
  }
  if (i == m - 1) {
    cout << arr[i] << endl;
  }
  return 0;
}
