You are given a string q. A sequence of k strings s_1, s_2, ..., s_{k} is called beautiful, if the concatenation of these strings is string q (formally, s_1 + s_2 + ... + s_{k} = q) and the first characters of these strings are distinct.

Find any beautiful sequence of strings or determine that the beautiful sequence doesn't exist.


-----Input-----

The first line contains a positive integer k (1 ≤ k ≤ 26) — the number of strings that should be in a beautiful sequence. 

The second line contains string q, consisting of lowercase Latin letters. The length of the string is within range from 1 to 100, inclusive.


-----Output-----

If such sequence doesn't exist, then print in a single line "NO" (without the quotes). Otherwise, print in the first line "YES" (without the quotes) and in the next k lines print the beautiful sequence of strings s_1, s_2, ..., s_{k}.

If there are multiple possible answers, print any of them.


-----Examples-----
Input
1
abca

Output
YES
abca

Input
2
aaacas

Output
YES
aaa
cas

Input
4
abc

Output
NO



-----Note-----

In the second sample there are two possible answers: {"aaaca", "s"} and {"aaa", "cas"}.

Difficulty: EASY

Solutions:
n = int(input())
s = input()
res = ''
dic = set()
num = 0
for (i, c) in enumerate(s):
	if c in dic:
		res += c
	else:
		res += '\n'
		dic.add(c)
		num += 1
		if num == n:
			res += s[i:]
			break
		else:
			res += c
if num != n:
	print('NO')
else:
	print('YES' + res)


def main():
	(k, q, s, res) = (int(input()), input(), set(), ['YES'])
	for (i, c) in enumerate(q):
		if c not in s:
			s.add(c)
			res.append('\n')
			k -= 1
			if not k:
				res.append(q[i:])
				print(''.join(res))
				return
		res.append(c)
	print('NO')
main()


s = []
indexes = []
k = int(input(''))
q = input('')
for i in range(0, len(q)):
	if q[i] not in s:
		s.append(q[i])
		indexes.append(i)
if len(s) < k:
	print('NO')
else:
	print('YES')
	for x in range(len(indexes)):
		if x >= k - 1:
			a = q[indexes[x]:len(q)]
			print(a)
			break
		else:
			a = q[indexes[x]:indexes[x + 1]]
			print(a)


k = int(input())
q = input()
used = set([])
strings = []
for i in range(len(q)):
	if len(strings) < k and q[i] not in used:
		strings += [q[i]]
		used.add(q[i])
	else:
		strings[-1] += q[i]
if len(strings) == k:
	print('YES')
	for s in strings:
		print(s)
else:
	print('NO')


n = int(input())
s = input()
a = {}
l = []
i = 0
while i < len(s):
	f = True
	for j in range(len(l)):
		if l[j][0] == s[i]:
			f = False
			break
	if f == True:
		l.append(s[i])
	else:
		l[-1] = l[-1] + s[i]
	i += 1
if len(l) < n:
	print('NO')
else:
	print('YES')
	for i in range(n, len(l)):
		l[n - 1] += l[i]
	for i in range(n):
		print(l[i])


def Tekrar(x, liSt):
	d = 0
	for i in liSt:
		if i == x:
			d = 1
	return d
K = int(input())
q = input()
i = 0
Tek = []
Output = []
while i < len(q):
	Tek.append(q[i])
	Out = ''
	while i < len(q) and Tekrar(q[i], Tek) == 1:
		Out += q[i]
		i += 1
	i += -1
	if len(Output) == K - 1:
		l = i + 1
		while l < len(q):
			Out += q[l]
			l += 1
		Output.append(Out)
		break
	Output.append(Out)
	i += 1
if len(Output) == K:
	print('YES')
	for i in Output:
		print(i)
else:
	print('NO')


chars = set()
k = int(input())
q = input()
strings = []
for char in q:
	cur = len(strings)
	if char not in chars and cur < k:
		chars.add(char)
		strings.append(char)
	else:
		strings[cur - 1] += char
if len(strings) == k:
	print('YES')
	for string in strings:
		print(string)
else:
	print('NO')


k = int(input())
s = input()
a = set(list(s))
if k > len(a):
	print('NO')
elif len(s) == 1:
	print('YES')
	print(s)
else:
	print('YES')
	a = [s[0]]
	r = s[0]
	k -= 1
	x = 1
	for i in range(1, len(s)):
		if k == 0:
			x = 0
			print(s[i - 1:])
			break
		elif s[i] not in a:
			print(r)
			a.append(s[i])
			r = s[i]
			k -= 1
		else:
			r += s[i]
	if x:
		print(r)


import sys
k = int(input())
s = input()
c = 0
sets = {chr(x) for x in range(ord('a'), ord('z') + 1)}
a = []
if len(s) < k:
	print('NO')
	sys.exit()
else:
	for x in range(len(s)):
		if s[x] in sets:
			c += 1
			sets.remove(s[x])
			a.append(x)
			if c == k:
				print('YES')
				for x in range(len(a) - 1):
					print(s[a[x]:a[x + 1]])
				print(s[a[-1]:])
				sys.exit()
print('NO')


k = int(input())
s = input()
a = []
for i in range(len(s)):
	if s[i] not in s[:i]:
		a.append(i)
if len(a) < k:
	print('NO')
else:
	print('YES')
	for i in range(k - 1):
		print(s[a[i]:a[i + 1]])
	print(s[a[k - 1]:])


k = int(input())
s = input()
counter = 0
used = set()
for let in s:
	if let not in used:
		counter += 1
		used.add(let)
if counter < k:
	print('NO')
else:
	print('YES')
	counter = 0
	used = set()
	for let in s:
		if let not in used and counter < k:
			if used:
				print()
			counter += 1
			used.add(let)
		print(let, end='')


k = int(input())
s = input()
first_letter = []
lst = []
count = prev = i = 0
l = len(s)
if k == 1:
	print('YES')
	print(s)
elif k > l:
	print('NO')
else:
	while i < l:
		first_letter.append(s[i])
		count += 1
		i += 1
		while i < l and s[i] in first_letter:
			i += 1
		if count != k:
			lst.append(s[prev:i])
			prev = i
		else:
			lst.append(s[prev:])
			break
	if len(lst) == k:
		print('YES')
		print('\n'.join(lst))
	else:
		print('NO')


k = int(input())
q = input()
used = set()
ans = []
t = ''
for c in q:
	if c in used:
		t += c
	else:
		if t:
			ans.append(t)
		t = c
		used.add(c)
ans.append(t)
if len(ans) < k:
	print('NO')
else:
	print('YES')
	ans[k - 1] = ''.join(ans[k - 1:])
	for s in ans[:k]:
		print(s)


k = int(input())
q = input()
i = 0
met = []
ts = []
while i < len(q):
	if q[i] in met:
		i += 1
	else:
		met.append(q[i])
		ts.append(i)
ts.append(len(q))
if len(ts) >= k + 1:
	print('YES')
	for i in range(len(ts) - 1):
		a = ts[i]
		b = ts[i + 1]
		if i == k - 1:
			print(q[a:])
			break
		print(q[a:b])
else:
	print('NO')


n = int(input())
s = input()
cont = [-1] * 1000
dif = []
for i in range(len(s)):
	if cont[ord(s[i])] == -1:
		dif.append(i)
		cont[ord(s[i])] = i
if len(dif) < n:
	print('NO')
else:
	print('YES')
	i = 0
	for i in range(1, n):
		print(s[dif[i - 1]:dif[i]])
	print(s[dif[i]:])


flag = []
index = []
for i in range(26):
	flag.append(False)
count = 0
k = int(input())
string = input()
for i in range(len(string)):
	char = ord(string[i]) - ord('a')
	if count == k:
		break
	if not flag[char]:
		flag[char] = True
		count += 1
		index.append(i)
if count >= k:
	print('YES')
	for i in range(k - 1):
		index_s = index[i]
		index_e = index[i + 1]
		print(string[index_s:index_e])
	print(string[index[k - 1]:])
else:
	print('NO')


import sys
k = int(input())
q = input()
if len(set(q)) < k:
	print('NO')
else:
	first = ''
	s = ''
	print('YES')
	for i in range(len(q)):
		if q[i] not in first:
			if len(s) > 0:
				print(s)
				s = ''
			s = q[i]
			first += q[i]
			k -= 1
			if k == 0:
				s += q[i + 1:len(q)]
				print(s)
				break
		else:
			s += q[i]


from collections import defaultdict

def cutter(a, cuts):
	if cuts == 1:
		return [a]
	comparador = set([a[0]])
	aux = a[0]
	ans = []
	flag = True
	for i in range(1, len(a)):
		if a[i] not in comparador:
			ans.append(aux)
			aux = a[i]
			comparador = comparador.union(set([a[i]]))
		else:
			aux += a[i]
		if len(ans) == cuts - 1:
			ans.append(a[i:])
			break
	return ans

def isBeautiful(a):
	mapa = defaultdict(int)
	for i in a:
		mapa[i[0]] += 1
		if mapa[i[0]] > 1:
			return False
	return True

def func():
	n = int(input())
	p = input()
	if len(p) < n:
		print('NO')
		return
	lista = cutter(p, n)
	if len(lista) < n:
		print('NO')
		return
	if isBeautiful(lista):
		print('YES')
		for i in lista:
			print(i)
	else:
		print('NO')
		return
func()


n = int(input())
s = input()
if n == 1:
	print('YES')
	print(s)
	return
a = []
b = []
for i in range(26):
	a.append(0)
	b.append(-1)
for i in range(len(s)):
	a[ord(s[i]) - ord('a')] += 1
	if b[ord(s[i]) - ord('a')] == -1:
		b[ord(s[i]) - ord('a')] = i
num = 0
c = []
for i in range(26):
	if a[i] != 0:
		num += 1
		c.append(b[i])
i = 0
lastNum = 0
if num < n:
	print('NO')
else:
	print('YES')
	minNum = 100000
	for i in range(len(c)):
		if minNum > c[i]:
			minNum = c[i]
			minNumPos = i
	if c[minNumPos] != 0:
		print(s[:c[minNumPos]])
		lastNum = c[minNumPos]
		n -= 1
	c[minNumPos] = 100000
	while n > 1:
		minNum = 100000
		for i in range(len(c)):
			if minNum > c[i]:
				minNum = c[i]
				minNumPos = i
		print(s[lastNum:c[minNumPos]])
		lastNum = c[minNumPos]
		c[minNumPos] = 100000
		n -= 1
	print(s[lastNum:])


n = int(input())
s = input()
flag = 0
begin = []
result = []
begin.append(s[0])
j = 0
num = 1
i = 1
l = len(s)
if n > len(s):
	flag = 1
elif n == 1:
	result.append(s)
else:
	while i < l:
		if begin.__contains__(s[i]) == False:
			num += 1
			begin.append(s[i])
			result.append(s[:i])
			s = s[i:]
			i = 0
			l = len(s)
			if num == n:
				result.append(s)
				break
			continue
		l = len(s)
		i += 1
	if num < n:
		flag = 1
if flag == 1:
	print('NO')
else:
	print('YES')
	for i in result:
		print(i)


k = int(input())
string = input()
first_char_set = set()
length = len(string)
unique_mnt = 0
res_ind = []
if k > length:
	print('NO')
	return
if k == 1:
	print('YES')
	print(string)
	return
for i in range(length):
	c = string[i]
	if not c in first_char_set:
		unique_mnt += 1
		first_char_set.add(c)
		res_ind.append(i)
if k > len(res_ind):
	print('NO')
	return
res = []
res_len = len(res_ind)
for i in range(res_len - 1):
	cur_ind = res_ind[i]
	next_ind = res_ind[i + 1]
	if k > 1:
		res.append(string[cur_ind:next_ind])
		k -= 1
	elif k == 1:
		res.append(string[cur_ind:])
		k -= 1
		break
if k == 1:
	res.append(string[next_ind:])
print('YES')
for el in res:
	print(el)


__author__ = 'emcenrue'
from string import ascii_lowercase
dict = dict()
for c in ascii_lowercase:
	dict[c] = 0
k = int(input())
q = input()
list = list()
ans = 0
i = 0
for c in q:
	if dict[c] == 0 and ans < k:
		ans += 1
		dict[c] = 1
		list.append(i)
	i += 1
if ans >= k:
	print('YES')
	if len(list) == 1:
		print(q[list[0]:len(q)])
	for i in range(len(list) - 1):
		print(q[list[i]:list[i + 1]])
		if i == len(list) - 2:
			print(q[list[i + 1]:len(q)])
else:
	print('NO')


from collections import defaultdict
(n, s, mem, ans, tem) = (int(input()), input(), defaultdict(int), '', '')
for (i, j) in enumerate(s):
	if n == 0:
		ans += s[i:]
		exit(print('YES', ans[1:], sep='\n'))
	if mem[j] == 0:
		ans += '\n' + j
		n -= 1
		mem[j] = 1
	else:
		ans += j
if n == 0:
	print('YES', ans[1:], sep='\n')
else:
	print('NO')


from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def main():
	n = ii()
	s = si()
	s1 = set(s)
	if n > len(s1):
		print('NO')
	else:
		print('YES')
		m = {}
		s1 = ''
		k = 0
		m[s[0]] = 1
		for i in range(n - 1):
			while 1:
				s1 += s[k]
				if s[k + 1] not in m:
					print(s1)
					m[s[k + 1]] = 1
					k += 1
					s1 = ''
					break
				k += 1
		print(s[k:])
main()


__author__ = 'clumpytuna'
k = int(input())
s = input()
list = []
for i in s:
	if not i in list:
		list.append(i)
if len(list) < k:
	print('NO')
	exit()
else:
	print('YES')
i = 0
list1 = []
s1 = ''
list1.append(s[0])
for j in s:
	if j not in list1:
		if i + 1 == k:
			s1 += j
		else:
			i += 1
			print(s1)
			s1 = ''
			s1 += j
			list1.append(j)
	else:
		s1 += j
print(s1)


a = int(input())
b = input()
d = a
c = []
r = ''
for i in range(len(b)):
	if r.find(b[i]) == -1 and a > 0:
		c.append(b[i])
		a = a - 1
		r += b[i]
	else:
		c[len(c) - 1] += b[i]
if len(c) < d:
	print('NO')
else:
	print('YES')
	for i in c:
		print(i)


from sys import stdin, stdout

def read_input():
	input_string_array = stdin.readlines()
	k = int(input_string_array[0])
	Q = input_string_array[1].strip()
	return [k, Q]

def is_character_new(beautiful_sequence, last_sequence, new_character):
	if last_sequence == new_character:
		return False
	for substring in beautiful_sequence:
		if substring[0] == new_character:
			return False
	return True

def process(k, Q):
	beautiful_sequence = []
	actual_string = Q[0]
	if k == 1:
		return [Q]
	for i in range(1, len(Q)):
		if is_character_new(beautiful_sequence, actual_string[0], Q[i]):
			beautiful_sequence.append(actual_string)
			actual_string = Q[i]
			k -= 1
			if k == 1:
				if not Q[i:]:
					return []
				else:
					beautiful_sequence.append(Q[i:])
					return beautiful_sequence
		else:
			actual_string += Q[i]
	return []

def main():
	[k, Q] = read_input()
	beautiful_sequence = process(k, Q)
	if not beautiful_sequence:
		stdout.write('NO' + '\n')
	else:
		stdout.write('YES' + '\n')
		for subsequence in beautiful_sequence:
			stdout.write(subsequence + '\n')
main()


k = int(input())
str = input()
dic = {}
for i in str:
	if i not in dic:
		dic[i] = 1
	else:
		dic[i] += 1
if k > len(dic):
	print('NO')
else:
	print('YES', end='')
	dic2 = []
	n = 0
	for i in str:
		if i not in dic2 and n < k:
			print()
			print(i, end='')
			n += 1
			dic2.append(i)
		else:
			print(i, end='')
	print()


n = int(input())
a = input()
d = {}
count = 0
for i in range(len(a)):
	if d.get(a[i]) == None:
		d[a[i]] = 1
		count += 1
if count >= n:
	print('YES')
	d = {}
	count = 0
	i = 0
	j = 0
	while count < n - 1:
		if d.get(a[i]) == None:
			d[a[i]] = 1
			if a[j:i] != '':
				count += 1
				print(a[j:i])
				j = i
		i += 1
	print(a[j:])
else:
	print('NO')


k = int(input())
q = input()
cut = [0]
topset = set([q[0]])
for i in range(1, len(q)):
	if len(cut) == k:
		break
	if q[i] not in topset:
		cut.append(i)
		topset.add(q[i])
if len(cut) < k:
	print('NO')
else:
	print('YES')
	for i in range(k - 1):
		print(q[cut[i]:cut[i + 1]])
	print(q[cut[-1]:])


k = int(input())
string = input()
chars = list(set(string))
if len(chars) < k:
	print('NO')
else:
	print('YES')
	j = 0
	first_letter = [string[0]]
	while len(string) > 0:
		for i in string:
			if i not in first_letter:
				first_letter.append(i)
				j += 1
				print(string[:string.find(i)])
				string = string[string.find(i):]
				break
			if j + 1 == k:
				print(string)
				string = ''
				break


k = int(input())
s = input()
i = 0
res = []
visited = [0] * 26
prev = '#'
while i < len(s) and k != 0:
	if visited[ord(s[i]) - ord('a')] == 0:
		k -= 1
		visited[ord(s[i]) - ord('a')] = 1
		res.append(i)
	i += 1
if k != 0:
	print('NO')
else:
	print('YES')
	for i in range(len(res)):
		if i == len(res) - 1:
			print(s[res[i]:])
		else:
			print(s[res[i]:res[i + 1]])


def main():
	(k, q, l, res) = (int(input()), input(), [True] * 123, [])
	for (i, c) in enumerate(q):
		if l[ord(c)]:
			l[ord(c)] = False
			res.append(i)
			k -= 1
			if not k:
				res.append(101)
				print('YES')
				print('\n'.join((q[i:j] for (i, j) in zip(res, res[1:]))))
				return
	print('NO')
main()


n = int(input())
q = input()
k = list(set(q))
k.sort(key=q.index)
if len(k) < n:
	print('NO')
elif n > 1:
	print('YES')
	for i in range(n - 1):
		print(q[q.index(k[i]):q.index(k[i + 1])])
	print(q[q.index(k[i + 1]):])
else:
	print('YES')
	print(q)


k = int(input())
a = input()
sum = 0
p = []
for i in range(len(a)):
	if a[i] not in p:
		sum += 1
		p.append(a[i])
if sum < k:
	print('NO')
else:
	p = []
	print('YES')
	for i in range(len(a)):
		if k == 0:
			print(a[i], end='')
		elif a[i] not in p:
			if len(p) != 0:
				print()
			print(a[i], end='')
			p.append(a[i])
			k -= 1
		else:
			print(a[i], end='')


def different_index_starts_at(start_index, start_letters, _str):
	for index in range(start_index, len(_str)):
		if _str[index] not in start_letters:
			return index
	return -1
k = int(input())
q = input()
starting_letters = [q[0]]
answer = []
start = 0
for i in range(k):
	different = different_index_starts_at(start + 1, starting_letters, q)
	if different != -1 and k != i + 1:
		starting_letters.append(q[different])
		answer.append(q[start:different])
		start = different
	else:
		answer.append(q[start:])
		break
if len(answer) == k:
	print('YES')
	for s in answer:
		print(s)
else:
	print('NO')


def solve():
	n = int(input())
	s = str(input())
	if n == 1:
		print('YES')
		print(s)
		return
	mp = dict()
	pos = []
	for (i, letter) in enumerate(s):
		if letter in mp:
			continue
		else:
			mp[letter] = True
			pos.append(i)
	if len(mp) < n:
		print('NO')
	else:
		print('YES')
		start = 0
		for i in range(n - 1):
			print(s[start:pos[i + 1]])
			start = pos[i + 1]
		print(s[start:])
solve()


k = int(input())
s = str(input())
refer = list()
lines = list()
line = str()
flag = False
for i in s:
	if i not in refer and k > 0:
		refer.append(i)
		k -= 1
		if line != '':
			lines.append(line)
		line = str()
	line += i
lines.append(line)
if k > 0:
	print('NO')
else:
	print('YES')
	print('\n'.join(lines))


def DFS(depth, start, str, used):
	if start >= len(str):
		return None
	if str[start] in used:
		return None
	if depth == 1:
		return [str[start:]]
	used += str[start]
	for i in range(start + 1, len(str)):
		if str[i] in used:
			continue
		res = DFS(depth - 1, i, str, used + str[start])
		if res != None:
			return res + [str[start:i]]
		break
	return None

def main():
	k = int(input())
	str = input()
	res = DFS(k, 0, str, '')
	if res == None:
		print('NO')
	else:
		print('YES')
		res.reverse()
		for token in res:
			print(token)
main()


def main():
	mode = 'filee'
	if mode == 'file':
		f = open('test.txt', 'r')
	get = lambda : [int(x) for x in (f.readline() if mode == 'file' else input()).split()]
	[k] = get()
	b = [False] * 26
	q = input()
	if k > len(q):
		print('NO')
		return
	if k == 1:
		print('YES')
		print(q)
		return
	done = []
	i = -1
	last = 0
	b[ord(q[0]) - 97] = True
	while i < len(q) - 1 and k > 0:
		i += 1
		if b[ord(q[i]) - 97]:
			continue
		done.append(q[last:i])
		b[ord(q[i]) - 97] = True
		last = i
		k -= 1
	if k == 0:
		done[-1] += q[last:]
	else:
		done.append(q[last:])
		k -= 1
	if k > 0:
		print('NO')
	else:
		print('YES')
		for i in done:
			print(i)
	if mode == 'file':
		f.close()
main()


__author__ = 'huash06'
import sys
import os
import datetime
import functools
import itertools
import collections

def findBeautifulStr(astr, n):
	res = []
	firsts = set()
	i = 0
	while i < len(astr):
		firsts.add(astr[i])
		if len(res) == n - 1:
			res.append(astr[i:])
			break
		hasNext = False
		for j in range(i + 1, len(astr)):
			if astr[j] not in firsts:
				res.append(astr[i:j])
				i = j
				hasNext = True
				break
		if not hasNext:
			break
	if len(res) == n:
		return res
	return []
N = int(input())
S = input()
res = findBeautifulStr(S, N)
if res:
	print('YES')
	for seg in res:
		print(seg)
else:
	print('NO')


I = input
P = print
k = int(I())
r = []
i = 0
s = I()
while i < len(s) and k > 0:
	j = i + 1
	while j < len(s) and any(map(lambda x: x[0] == s[j], [s[i]] + r)):
		j += 1
	r += [s[i:j]]
	k -= 1
	i = j
if k:
	P('NO')
else:
	P('YES', end='')
	t = 0
	for i in r:
		P('\n' + i, end='')
		t += len(i)
	P(s[t:])


k = int(input())
q = input()
b = []
for x in range(len(q)):
	if q[0:x + 1].count(q[x]) == 1:
		b.append(q[x])
	else:
		b[-1] += q[x]
if len(b) >= k:
	print('YES')
	for x in range(k - 1):
		print(b[x])
	for y in range(k, len(b)):
		b[k - 1] += b[y]
	print(b[k - 1])
if len(b) < k:
	print('NO')


k = int(input())
s = input()
l = []
se = set()
for i in range(len(s)):
	if s[i] not in se:
		l.append(i)
		se.add(s[i])
	if len(l) == k:
		break
if len(l) < k:
	print('NO')
	quit()
l.append(len(s))
print('YES')
for i in range(len(l) - 1):
	print(s[l[i]:l[i + 1]])


k = int(input())
s = input()
if len(set(s)) < k:
	print('NO')
	exit()
else:
	print('YES')
d = set()
for i in range(k - 1):
	d.add(s[0])
	for j in range(1, len(s)):
		if s[j] in d:
			continue
		else:
			print(s[:j])
			s = s[j:]
			break
print(s)


n = int(input())
q = input()
if len(set(q)) < n:
	print('NO')
else:
	w = set()
	k = q[0]
	s = 0
	i = 1
	n -= 1
	w.add(k)
	print('YES')
	while n:
		while q[i] in w:
			i += 1
		w.add(q[i])
		print(q[s:i])
		s = i
		n -= 1
	print(q[s:])


import time
import string

class Profiler(object):

	def __enter__(self):
		self._startTime = time.time()

	def __exit__(self, type, value, traceback):
		print('Elapsed time: {:.3f} sec'.format(time.time() - self._startTime))
k = int(input())
s = input()
m = {}
for el in string.ascii_lowercase:
	m[el] = 0
if len(set(s)) < k:
	print('NO')
else:
	i = 0
	t = []
	while i < len(s):
		if k == 1:
			t.append(s[i:])
			break
		if m[s[i]] == 0:
			m[s[i]] = 1
			tmp = s[i]
			i += 1
			while i < len(s) and m[s[i]]:
				tmp += s[i]
				i += 1
			t.append(tmp)
			k -= 1
		else:
			i += 1
	print('YES')
	for el in t:
		print(el)


t = int(input())
s = list(input())
p = len(set(s))
if p < t:
	print('NO')
else:
	f = [False for i in range(26)]
	c = []
	l = ''
	for i in range(len(s)):
		if t == 0:
			c.append(l + str(''.join(s[i:])))
			l = ''
			break
		if f[ord(s[i]) - 97] != True:
			if l != '':
				c.append(l)
			l = s[i]
			f[ord(s[i]) - 97] = True
			t -= 1
		else:
			l += s[i]
	if l != '':
		c.append(l)
	print('YES')
	for i in range(len(c)):
		print(c[i])


def setOfString():
	q = input()
	si = []
	lastAdded = 0
	completedAlphabet = []
	completedAlphabet.append(q[0])
	newString = ''
	for i in q:
		if completedAlphabet.count(i) == 0:
			si.append(newString)
			newString = i
			completedAlphabet.append(i)
		else:
			newString += i
	si.append(newString)
	return si
k = int(input())
setOfStrings = setOfString()
if k > len(setOfStrings):
	print('NO')
else:
	print('YES')
	for i in range(k - 1):
		print(setOfStrings[i])
	print(str(setOfStrings[k - 1:]).replace('[', '').replace(']', '').replace("'", '').replace(' ', '').replace(',', ''))


n = int(input())
s = input()
s = list(s)
s1 = list(dict.fromkeys(s))
if len(s1) < n:
	print('NO')
else:
	print('YES')
	i = 0
	j = 0
	while j < n:
		ind = s.index(s1[i])
		j += 1
		if j < n:
			ind2 = s.index(s1[i + 1])
			for o in range(ind, ind2):
				print(str(s[o]), end='')
			print()
		else:
			for o in range(ind, len(s)):
				print(s[o], end='')
			print()
		i += 1


__author__ = 'artyom'

def main():
	b = [False] * 26
	n = read()
	s = read(0)
	if n == 1:
		return ['YES', s]
	tokens = ['YES']
	token = ''
	i = 1
	p = 0
	for c in s:
		if not b[ord(c) - 97]:
			b[ord(c) - 97] = True
			if token:
				tokens.append(token)
				i += 1
				if i == n:
					break
				else:
					token = ''
		token += c
		p += 1
	tokens.append(s[p:])
	if len(tokens) - 1 < n:
		return 'NO'
	return tokens

def read(mode=1, size=None):
	if mode == 0:
		return input().strip()
	if mode == 1:
		return int(input().strip())
	if mode == 2:
		return input().strip().split()
	if mode == 3:
		return list(map(int, input().strip().split()))
	a = []
	for _ in range(size):
		a.append(read(3))
	return a

def write(s='\n'):
	if s is None:
		s = ''
	if isinstance(s, tuple) or isinstance(s, list):
		s = '\n'.join(map(str, s))
	s = str(s)
	print(s, end='\n')
write(main())


n = int(input())
s = input()
a = []
if len(s) < n:
	print('NO')
else:
	for i in s:
		if len(a) == n:
			break
		if i in a:
			continue
		else:
			a.append(i)
	l = []
	for i in range(len(a)):
		if i == len(a) - 1:
			l.append(s[s.index(a[i]):])
		else:
			l.append(s[s.index(a[i]):s.index(a[i + 1])])
	if len(a) == n:
		print('YES')
		for i in l:
			print(i)
	else:
		print('NO')


import sys
n = int(input())
s = str(input())
l = []
for i in s:
	if not i in l:
		l.append(i)
vals = []
if len(l) < n:
	print('NO')
	sys.exit(0)
else:
	print('YES')
	for i in range(n):
		vals.append(s.index(l[i]))
for i in range(n):
	if i == n - 1:
		print(s[vals[len(vals) - 1]:len(s)])
	else:
		print(s[vals[i]:vals[i + 1]])


n = int(input())
S = input()
l = []
l1 = []
l1.append(S[0])
j = 0
v = 1
c = 1
r = 0
T = S[0]
for i in range(1, len(S)):
	if v == 0 and c == 1:
		v = 1
		T = S[i]
	elif S[i] in l1:
		T = T + S[i]
	else:
		j = j + 1
		if j < n:
			l.append(T)
			T = S[i]
			l1.append(S[i])
			l1.append(T[0])
		else:
			l.append(T + S[i:])
			r = 1
			break
		v = 0
		c = 0
if r == 0:
	l.append(T)
if n == len(l) and n <= 26:
	print('YES')
	for i in range(len(l)):
		print(l[i])
else:
	print('NO')


k = int(input())
q = input()
if k == 1:
	print('YES')
	print(q)
else:
	(s, ans, t) = (set(), [], '')
	for i in q:
		if not i in s:
			s.add(i)
			ans.append(t)
			t = i
		else:
			t += i
	ans.append(t)
	ans.pop(0)
	if len(ans) >= k:
		print('YES')
		print('\n'.join((ans[i] for i in range(k - 1))))
		print(''.join((ans[i] for i in range(k - 1, len(ans)))))
	else:
		print('NO')


n = int(input())
s = input()
b = [-1] * 256
c = []
for i in range(len(s)):
	if b[ord(s[i])] == -1:
		b[ord(s[i])] = i
		c.append(i)
if len(c) >= n:
	print('YES')
	for i in range(n):
		if i < n - 1:
			print(s[c[i]:c[i + 1]])
		else:
			print(s[c[i]:])
else:
	print('NO')


n = int(input())
t = input()
f = []
v = []
if len(set(list(t))) < n:
	print('NO')
else:
	u = ''
	p = 0
	h = 0
	while p < len(t):
		if t[p] not in f:
			if len(u) > 0:
				v.append(u)
				u = ''
			f.append(t[p])
			u += t[p]
		else:
			u += t[p]
		p += 1
	if len(u) > 0:
		v.append(u)
	if len(v) >= n:
		print('YES')
		if n == 1:
			print(''.join(v))
		else:
			for j in v[:n - 1] + [''.join(v[n - 1:])]:
				print(j)
	else:
		print('NO')


k = int(input())
q = input()
a = []
result = []
for i in range(97, 123):
	a.append(chr(i))
for (j, t) in enumerate(q):
	if len(result) == k:
		result[len(result) - 1] += q[j:]
		break
	if t in a:
		a.remove(t)
		result.append(q[j])
	else:
		result[len(result) - 1] += t
if len(result) == k:
	print('YES')
	for row in result:
		print(row)
else:
	print('NO')


k = int(input())
s = input()
ans = []
cur = ''
se = set()
for i in range(len(s)):
	if s[i] not in se:
		if len(cur) > 0:
			ans.append(cur)
		cur = ''
		cur = s[i]
		se.add(s[i])
	else:
		cur += s[i]
if cur:
	ans.append(cur)
l = len(ans)
if len(ans) < k:
	print('NO')
else:
	print('YES')
	for i in range(k, len(ans)):
		ans[k - 1] += ans[i]
	print('\n'.join(ans[:k]))


def main():
	n = int(input())
	s = str(input())
	if n > len(s):
		print('NO')
		return
	elif n == 1:
		print('YES')
		print(s)
	else:
		strings = []
		letters = len(set(list(s)))
		if letters < n:
			print('NO')
			return
		curr = s[0]
		comp = s[0]
		used = {s[0]: 1}
		cant = 0
		for i in range(1, len(s)):
			if s[i] == comp:
				curr += s[i]
			else:
				check = used.get(s[i], -1)
				if check != -1:
					curr += s[i]
					if i == len(s) - 1:
						strings.append(curr)
						break
					continue
				else:
					strings.append(curr)
					cant += 1
					if cant == n:
						strings[-1] = strings[-1] + s[i:]
						break
					curr = s[i]
					comp = s[i]
					used[comp] = 1
					if i == len(s) - 1:
						strings.append(curr)
						break
		if curr != strings[-1] and cant != n:
			strings.append(curr)
		print('YES')
		for i in strings:
			print(i)
main()


k = int(input())
q = input()
s = set()
a = []
for i in range(len(q)):
	if not q[i] in s:
		s.add(q[i])
		a += [i]
		if len(a) == k:
			print('YES')
			for j in range(k - 1):
				print(q[a[j]:a[j + 1]])
			print(q[a[-1]:])
			exit()
print('NO')


def output():
	print('YES')
	for st in ans:
		print(st)
k = int(input())
q = input()
n = len(q)
ans = []
used = set()
lim = 1
last = -1
for i in range(n):
	if q[i] not in used:
		if last != -1:
			lim += 1
			ans.append(q[last:i])
		used.add(q[i])
		last = i
	if lim == k:
		ans.append(q[i:])
		output()
		break
if lim < k:
	print('NO')


def main():
	n = int(input())
	s = input()
	result = []
	substring = []
	d = set()
	for i in range(len(s)):
		if n > 0 and s[i] not in d:
			if len(substring) > 0:
				result.append(''.join(substring))
				substring = []
			substring.append(s[i])
			d.add(s[i])
			n -= 1
		else:
			substring.append(s[i])
	if len(substring) > 0:
		result.append(''.join(substring))
	if n > 0:
		print('NO')
		return
	else:
		print('YES')
		for s in result:
			print(s)

def __starting_point():
	main()
__starting_point()


from sys import stdin, stdout, stderr, setrecursionlimit
setrecursionlimit(100000)

def debug(*e):
	if not __debug__:
		print(*e, file=stderr)

def dd(*vals):
	import inspect, re
	frame = inspect.getframeinfo(inspect.stack()[1][0])
	vs = re.search('dd\\((.+)\\)', frame.code_context[0]).group(1).split(',')
	if vs:
		debug(','.join(('{0} = {1}'.format(vs[i], v) for (i, v) in enumerate(vals))))

def trace(f):

	def traced(*args, **kw):
		debug('calling {} with args {}, {}'.format(f.__name__, args, kw))
		return f(*args, **kw)
	return traced

def read():
	return stdin.readline().rstrip()

def readarr(sep=None, maxsplit=-1):
	return read().split(sep, maxsplit)

def readint():
	return int(read())

def readintarr(sep=None, maxsplit=-1):
	return [int(a) for a in readarr(sep, maxsplit)]

def write(*args, **kwargs):
	sep = kwargs.get('sep', ' ')
	end = kwargs.get('end', '\n')
	stdout.write(sep.join((str(a) for a in args)) + end)

def writearr(arr, sep=' ', end='\n'):
	stdout.write(sep.join((str(a) for a in arr)) + end)

def solv():
	global parts, s, n, lt
	if len(lt) < parts:
		write('NO')
		return
	r = []
	i = 0
	while i < n:
		if len(r) == parts:
			write('YES')
			r[-1] += s[i:]
			write('\n'.join(r))
			return
		if s[i] in lt:
			j = n
			for j in range(i + 1, n):
				if s[j] in lt:
					break
			else:
				if len(r) + 1 < parts:
					dd(r)
					write('NO')
					return
			r.append(s[i:j])
			lt -= {s[i]}
			i = j - 1
		else:
			r[-1] += s[i]
		i += 1
	write('YES')
	write('\n'.join(r))
parts = readint()
s = read()
n = len(s)
lt = set(s)
solv()


n = int(input())
t = input()
if n > len(set(t)):
	print('NO')
else:
	pos = [0 for _ in range(len(t) + 1)]
	dis = set()
	c = 0
	for i in range(len(t)):
		if t[i] not in dis:
			dis.add(t[i])
			pos[c] = i
			c = c + 1
	pos[n] = len(t)
	print('YES')
	for i in range(n):
		print(t[pos[i]:pos[i + 1]])


k = int(input())
s = input()
a = []
if k == 1:
	print('YES')
	print(s)
else:
	j = 0
	i = 1
	set_ = set()
	set_.add(s[j])
	while i < len(s):
		if k > 0:
			if s[i] not in set_:
				a.append(s[j:i])
				j = i
				set_.add(s[j])
				k = k - 1
				if k - 1 == 0:
					a.append(s[i:])
					set_.add(s[i])
					k = k - 1
					j = len(s) - 1
		i = i + 1
	if k == 0:
		print('YES')
		for i in range(len(a)):
			print(a[i])
	else:
		print('NO')


n = int(input())
t = input()
ans = list()
cur = ''
used = set()
for i in range(len(t)):
	if t[i] not in used:
		if len(cur) > 0:
			ans.append(cur)
		cur = t[i]
		used.add(t[i])
	else:
		cur += t[i]
ans.append(cur)
if len(ans) < n:
	print('NO')
else:
	print('YES')
	for i in range(n, len(ans)):
		ans[n - 1] += ans[i]
	for i in range(n):
		print(ans[i])


n = int(input())
q = input()
if n > len(q):
	print('NO')
elif n == 1:
	print('YES')
	print(q)
else:
	arr = [0] * len(q)
	for x in range(0, len(q)):
		arr[x] = q[x]
	con = arr[0]
	res = []
	count = 0
	x = 0
	used = ['-1'] * len(q)
	used[0] = con
	usedCount = 0
	while count < n - 1:
		if x + 1 < len(arr) and (arr[x] == arr[x + 1] or arr[x + 1] in used):
			con += arr[x + 1]
			x += 1
		else:
			res.append(con)
			usedCount += 1
			if x + 1 < len(arr):
				used[usedCount] = arr[x + 1]
				con = arr[x + 1]
			count += 1
			x += 1
	totalLen = 0
	for x in range(0, count):
		totalLen += len(res[x])
	res.append(q[totalLen:])
	for x in res:
		if x.isspace() or x == '':
			res.remove(x)
	res1 = set(res)
	length = 0
	for each in res1:
		length += 1
	if res[len(res) - 1] == '-1' or length < n:
		print('NO')
	else:
		print('YES')
		for x in res:
			print(x)


k = int(input())
s = input()
used = [False for _ in range(26)]
starts = []
for (i, c) in enumerate(s):
	x = ord(c) - ord('a')
	if not used[x]:
		used[x] = True
		starts.append(i)
if len(starts) < k:
	print('NO')
else:
	print('YES')
	while len(starts) > k:
		starts.pop()
	for i in range(k - 1):
		print(s[starts[i]:starts[i + 1]])
	print(s[starts[-1]:])


n = int(input())
s = input()
point = 1
ans = str()
used = set(s[0])
last_point = 0
for i in range(n - 1):
	while point <= len(s) and s[point - 1] in used:
		point += 1
	if point <= len(s):
		used.add(s[point - 1])
		ans += s[last_point:point - 1] + '\n'
		last_point = point - 1
	else:
		print('NO')
		break
ans += s[last_point:]
if point <= len(s):
	print('YES')
	print(ans)


n = int(input())
s = input()
arr = set(list(s))
if len(arr) < n:
	print('NO')
else:
	ans = []
	d = {}
	for i in s:
		if i in d:
			ans[-1] += i
		else:
			d[i] = 1
			ans.append(i)
	print('YES')
	for i in ans[:n - 1]:
		print(i)
	print(''.join(ans[n - 1:]))


import sys
import math
import bisect

def solve(s, k):
	d = dict()
	for i in range(len(s)):
		if s[i] not in d:
			d[s[i]] = i
	A = list(d.values())
	if len(A) < k:
		return None
	B = []
	for i in range(k):
		if i == k - 1:
			B.append(s[A[i]:])
		else:
			B.append(s[A[i]:A[i + 1]])
	return B

def main():
	k = int(input())
	s = input()
	ans = solve(s, k)
	if ans:
		print('YES')
		for a in ans:
			print(a)
	else:
		print('NO')
main()


import sys, os, io
from sys import stdin
import math
from collections import defaultdict
from heapq import heappush, heappop, heapify
from bisect import bisect_left, bisect_right
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
alphabets = list('abcdefghijklmnopqrstuvwxyz')
from types import GeneratorType

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(int(i))
			n = n / i
	if n > 2:
		l.append(n)
	return list(set(l))

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def sieveForSmallestPrimeFactor():
	MAXN = 100001
	spf = [0 for i in range(MAXN)]
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, math.ceil(math.sqrt(MAXN))):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
	return spf

def getPrimeFactorizationLOGN(x):
	spf = sieveForSmallestPrimeFactor()
	ret = list()
	while x != 1:
		ret.append(spf[x])
		x = x // spf[x]
	return ret

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def si():
	return input()

def divideCeil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
	input = lambda : sys.stdin.readline().rstrip('\r\n')

def solve():
	k = ii()
	s = si()
	if len(set(s)) >= k:
		print('YES')
	else:
		print('NO')
		return
	s1 = set(s)
	ans = []
	for i in range(len(s)):
		if s[i] in s1:
			ans.append(s[i])
			s1.remove(s[i])
		else:
			ans[-1] += s[i]
	if len(ans) > k:
		new = ans[k - 1:]
		ans = ans[:k - 1]
		new = ''.join(new)
		ans.append(new)
	for i in ans:
		print(i)
t = 1
for _ in range(t):
	solve()


k = int(input())
q = input()
s = [None] * k
if k == 1:
	print('YES')
	print(q)
else:
	first_letters = set([q[0]])
	j = 0
	i = 0
	while True:
		if q[i] not in first_letters:
			first_letters.add(q[i])
			s[j] = q[:i]
			j += 1
			q = q[i:]
			i = 1
			if j + 1 == k:
				s[j] = q
				print('YES')
				print('\n'.join(s))
				break
		else:
			i += 1
		if i == len(q):
			print('NO')
			break


k = int(input())
q = input().strip()

def solve(k, q):
	if k == 1:
		return [q]
	used = set()
	ss = []
	s = [q[0]]
	used.add(q[0])
	for i in range(1, len(q)):
		c = q[i]
		if c in used:
			s.append(c)
			continue
		used.add(c)
		ss.append(''.join(s))
		if len(used) == k:
			ss.append(q[i:])
			break
		s = [c]
	else:
		return False
	return ss
ans = solve(k, q)
if ans:
	print('YES')
	for a in ans:
		print(a)
else:
	print('NO')


k = int(input())
sona = input()
letters = set(sona)
if k == 1:
	print('YES')
	print(sona)
	exit()
if len(letters) < k:
	print('NO')
	exit()
print('YES')
wordIndexList = []
char = sona[0]
letters.remove(sona[0])
for i in range(len(sona)):
	if sona[i] == char:
		continue
	if sona[i] != char and sona[i] in letters:
		wordIndexList.append(i)
		char = sona[i]
		letters.remove(sona[i])
start = 0
for i in range(k):
	if i != k - 1:
		print(sona[start:wordIndexList[i]])
		start = wordIndexList[i]
	else:
		print(sona[start:])


n = int(input())
letters = set([])
pos = []
s = input()
counter = 0
for c in s:
	if not c in letters:
		letters.add(c)
		pos.append(counter)
		if len(letters) == n:
			break
	counter += 1
if len(letters) != n:
	print('NO')
	exit(0)
else:
	print('YES')
	pos.append(len(s))
	for i in range(len(pos) - 1):
		print(s[pos[i]:pos[i + 1]])


n = int(input())
s = input()
t = []
k = []
for i in range(len(s)):
	if s[i] not in t:
		t.append(s[i])
		k.append(i)
if len(t) < n:
	print('NO')
else:
	print('YES')
	for u in range(n - 1):
		print(s[k[0]:k[1]])
		k.pop(0)
	print(s[k[0]:])


def setofstrings():
	k = int(input())
	q = input()
	qset = set([i for i in q])
	if len(qset) < k:
		print('NO')
		return
	firsts = []
	print('YES')
	if k == 1:
		print(q)
		return
	last = 0
	firsts.append(q[0])
	for i in range(len(q)):
		if q[i] not in firsts:
			firsts.append(q[i])
			print(q[last:i])
			last = i
			k -= 1
			if k == 1:
				print(q[last:])
				return
setofstrings()


k = int(input())
s = input()
ans = []
cur = ''
used = set()
for i in range(len(s)):
	if s[i] not in used:
		if len(cur) > 0:
			ans.append(cur)
		cur = ''
		cur += s[i]
		used.add(s[i])
	else:
		cur += s[i]
ans.append(cur)
if len(ans) < k:
	print('NO')
else:
	print('YES')
	for i in range(k, len(ans)):
		ans[k - 1] += ans[i]
	for i in range(k):
		print(ans[i])


k = int(input())
s = input()
arr = [s[0]]
ar = [0]
for i in range(len(s)):
	if s[i] not in arr:
		arr.append(s[i])
		ar.append(i)
if len(ar) < k:
	print('NO')
else:
	print('YES')
	for i in range(k - 1):
		print(s[ar[i]:ar[i + 1]])
	print(s[ar[k - 1]:])


n = int(input())
s = input()
F = [0] * 26
arr = []
i = 0
while i < len(s):
	if not F[ord(s[i]) - ord('a')]:
		tem = s[i]
		F[ord(s[i]) - ord('a')] = 1
		i += 1
		while i < len(s) and F[ord(s[i]) - ord('a')]:
			tem = tem + s[i]
			i += 1
		arr.append(tem)
if len(arr) < n:
	print('NO')
else:
	print('YES')
	while len(arr) != n:
		ss = arr[-1]
		arr.pop(-1)
		ss = arr[-1] + ss
		arr.pop(-1)
		arr.append(ss)
	print(*arr, sep='\n')


from collections import Counter
number_of_words = int(input())
input_string = input()
words_dict = Counter(input_string)
if len(words_dict) < number_of_words:
	print('NO')
else:
	print('YES')
	if number_of_words == 1:
		print(input_string)
	else:
		using_letters = []
		for i in range(0, number_of_words - 1):
			output_string = ''
			current_letter = input_string[0]
			using_letters += current_letter
			while True:
				if input_string[0] in using_letters:
					output_string += input_string[0]
					input_string = input_string[1:]
				else:
					break
			print(output_string)
		print(input_string)


K = int(input())
used = set()
S = input()
indexes = []
ind = 0
while len(indexes) < K and ind < len(S):
	if S[ind] not in used:
		indexes += [ind]
		used.add(S[ind])
	ind += 1
if len(indexes) < K:
	print('NO')
else:
	print('YES')
	for (i, v) in enumerate(indexes):
		if i == len(indexes) - 1:
			print(S[v:])
		else:
			print(S[v:indexes[i + 1]])


n = int(input())
s = input()
c = 1
t = 0
d = ''
p = set(s)
if len(s) < n:
	print('NO')
elif len(p) < n:
	print('NO')
else:
	print('YES')
	for i in range(1, len(s)):
		a = ord(s[i - 1])
		b = ord(s[i])
		z = ord(s[t])
		if a != b and d.count(s[i]) == 0 and (c < n) and (b != z):
			c += 1
			print(s[t:i])
			d += s[t]
			t = i
		elif c == n:
			break
	if c == n:
		print(s[t:len(s)])


from collections import *
from heapq import *
from bisect import *
from math import *
from itertools import *
import sys
inf = float('inf')
k = int(input())
s = str(input())
l = []
for i in s:
	if not i in l:
		l.append(i)
vals = []
if len(l) < k:
	print('NO')
	sys.exit(0)
else:
	print('YES')
	for i in range(k):
		vals.append(s.index(l[i]))
for i in range(k):
	if i == k - 1:
		print(s[vals[len(vals) - 1]:len(s)])
	else:
		print(s[vals[i]:vals[i + 1]])


from sys import stdin

def solve(q, k):
	(subs, s, s_set, N) = (list(), list(), set(q[0]), len(q))
	for n in range(N):
		if q[n] not in s_set and k != 1:
			subs.append(f"{''.join(s)}")
			k -= 1
			s_set.add(q[n])
			s = list(q[n])
		else:
			s.append(q[n])
	subs.append(f"{''.join(s)}")
	k -= 1
	if k == 0:
		print('YES')
		for sub in subs:
			print(sub)
	else:
		print('NO')

def main():
	k = int(stdin.readline())
	q = stdin.readline().rstrip()
	solve(q, k)
main()


k_ = input()
k = int(k_)
q = input()
chString = ''
index = 0
indexQ = []
if len(q) < k:
	print('NO')
else:
	for ch in q:
		if ch not in chString:
			chString += ch
			indexQ.append(index)
		index += 1
	if len(chString) < k:
		print('NO')
	else:
		print('YES')
		previous = 0
		for i in range(1, k + 1):
			if i == k:
				print(q[previous:])
			else:
				m = indexQ[i]
				print(q[previous:m])
				previous = m


k = int(input())
q = input()
ans_strings = []
starts = []
for i in range(len(q)):
	if q[i] not in starts:
		if k > 1:
			starts.append(q[i])
			ans_strings.append(q[i])
			k -= 1
		elif k == 1:
			ans_strings.append(q[i:])
			k -= 1
			break
	else:
		ans_strings[len(ans_strings) - 1] += q[i]
if k == 0:
	print('YES')
	for i in ans_strings:
		print(i)
else:
	print('NO')


k = int(input())
s = input()
liters = set((chr(ord('a') + i) for i in range(26)))
result = []
for i in s:
	if i in liters:
		result.append(i)
		liters.remove(i)
	else:
		result[-1] += i
if len(result) < k:
	print('NO')
else:
	while len(result) != k:
		t = result.pop()
		result[-1] += t
	print('YES')
	print('\n'.join(result))


n = int(input())
s = k = input()
if len(s) < n or (len(s) == n and len(set(s)) < n) or len(set(s)) < n:
	print('NO')
elif len(s) == n:
	print('YES')
	for i in range(n):
		print(s[i])
else:
	print('YES')
	r = ''
	for element in s:
		if element not in r:
			r += element
	j = 0
	for i in range(n - 1):
		print(s[j:s.find(r[i + 1])])
		j = s.find(r[i + 1])
	print(s[j:])


k = int(input())
s = input()
sts = set(s[0])
li = 0
arr = []
for i in range(1, len(s)):
	ch = s[i]
	if ch not in sts:
		sts.add(ch)
		arr.append(s[li:i])
		li = i
arr.append(s[li:])
if len(arr) < k:
	print('NO')
else:
	while len(arr) > k:
		r = arr.pop()
		l = arr.pop()
		arr.append(l + r)
	print('YES')
	for st in arr:
		print(st)


q = int(input())
s = input()
unique = set()
for c in s:
	unique.add(c)
if len(unique) < q:
	print('NO')
	exit()
print('YES')
char_to_index = {}
for c in s:
	char_to_index[c] = s.index(c)
prints = []
for v in char_to_index.values():
	prints.append(v)
for i in range(q):
	if i == q - 1:
		print(s[prints[i]:])
	else:
		print(s[prints[i]:prints[i + 1]])


n = int(input())
s = input()
s_s = set()
l_i = list()
for (i, c) in enumerate(s):
	if len(l_i) != n:
		if c not in s_s:
			if len(l_i) != 0:
				l_i[len(l_i) - 1][1] = i
			l_i.append([i, len(s)])
			s_s.add(c)
	else:
		break
if len(l_i) != n:
	print('NO')
else:
	print('YES\n' + '\n'.join((s[l_i[i][0]:l_i[i][1]] for i in range(n))))


k = int(input())
s = input()
(result, new, used) = (list(), '', set())
for i in range(len(s)):
	if s[i] not in used:
		if len(new) > 0:
			result.append(new)
		new = ''
		new += s[i]
		used.add(s[i])
	else:
		new += s[i]
result.append(new)
if len(result) < k:
	print('NO')
else:
	print('YES')
	for i in range(k, len(result)):
		result[k - 1] += result[i]
	for i in range(k):
		print(result[i])


n = int(input())
s = input()
s1 = set()
ar = []
i = 0
prs = ''
j = 0
while len(ar) < n and i < len(s):
	ar.append(s[i])
	s1.add(s[i])
	i += 1
	while i < len(s) and s[i] in s1:
		ar[-1] += s[i]
		i += 1
if i < len(s):
	ar[-1] += s[i:]
if len(ar) < n:
	print('NO')
else:
	print('YES')
	for i in ar:
		print(i)


k = int(input())
s = list(input())
a = []
for i in range(0, 30):
	a.append(1)
sum = 0
for x in s:
	sum = sum + a[ord(x) - ord('a')]
	a[ord(x) - ord('a')] = 0
if sum >= k:
	print('YES', end='')
	for x in s:
		if a[ord(x) - ord('a')] == 0 and k > 0:
			k -= 1
			print()
			print(x, end='')
		else:
			print(x, end='')
		a[ord(x) - ord('a')] = 1
	print()
else:
	print('NO')


from sys import *
k = int(input())
s = input()
ee = set()
for i in s:
	ee.add(i)
if k > len(ee):
	print('NO')
	exit(0)
print('YES')
i = 1
cur = s[0]
num = k - 1
ee.discard(s[0])
while i < len(s):
	if s[i] in ee and num:
		print(cur)
		ee.discard(s[i])
		num -= 1
		cur = s[i]
	else:
		cur += s[i]
	i += 1
print(cur)


from math import *
from bisect import *
from collections import Counter, defaultdict
I = lambda : int(input())
M = lambda : map(int, input().split())
LI = lambda : list(map(int, input().split()))
n = I()
s = input()
b = []
c = []
d = n
for i in range(len(s)):
	if s[i] not in b:
		n -= 1
		b += [s[i]]
		c += [i]
	if n == 0:
		break
c += [len(s)]
if n > 0:
	print('NO')
else:
	print('YES')
	for i in range(0, d):
		print(s[c[i]:c[i + 1]])


from collections import OrderedDict
count = int(input())
line = input()
uniq = ''.join(OrderedDict.fromkeys(line).keys())
if count > len(uniq):
	print('NO')
else:
	print('YES')
	if count == len(uniq):
		while len(line) != 0:
			first_uniq = 0
			uniq = uniq[1:]
			if len(uniq) == 0:
				print(line)
				break
			last_uniq = line.find(uniq[0])
			print(line[first_uniq:last_uniq])
			line = line[last_uniq:]
	else:
		while count != 1:
			first_uniq = 0
			uniq = uniq[1:]
			last_uniq = line.find(uniq[0])
			print(line[first_uniq:last_uniq])
			line = line[last_uniq:]
			count -= 1
		print(line)


def rint():
	return int(input())

def rints():
	return list(map(int, input().split()))
k = rint()
q = input()
p = [1000] * 26
for (i, c) in enumerate(q):
	p[ord(c) - ord('a')] = min(i, p[ord(c) - ord('a')])
pv = [i for i in p if i < 1000]
if len(pv) < k:
	print('NO')
	exit(0)
pv = sorted(pv)
print('YES')
for i in range(k):
	if i == k - 1:
		print(q[pv[i]:])
	else:
		print(q[pv[i]:pv[i + 1]])


k = int(input())
q = input()
tmp = k
l = len(q)
L = []
I = []
T = []
if len(set(q)) < k:
	print('NO')
else:
	print('YES')
	p = q[0]
	I.append(0)
	T.append(q[0])
	for i in range(l):
		if q[i] not in T:
			I.append(i)
			T.append(q[i])
	X = []
	for i in range(k):
		X.append(I[i])
	for i in range(k):
		if i == k - 1:
			print(q[X[i]:])
		else:
			print(q[X[i]:X[i + 1]])


r = lambda : list(map(int, input().split()))
import sys
n = int(input())
s = input()
q = set()
if n > len(set(s)):
	print('NO')
else:
	print('YES')
	k = 0
	ans = []
	for i in range(len(s)):
		if k == n:
			break
		if s[i] not in q:
			ans.append(i)
			q.add(s[i])
			k += 1
	ans.append(len(s))
	for i in range(len(ans) - 1):
		print(s[ans[i]:ans[i + 1]])


N = int(input())
S = input()
found = set()
for i in range(len(S)):
	k = S[i]
	if not k in found:
		found.add(k)
if len(found) >= N:
	print('YES')
	ptr1 = 0
	count = 0
	found.remove(S[ptr1])
	for i in range(len(S) + 1):
		if count == N - 1:
			print(S[ptr1:])
			break
		if i > 0 and S[i] in found:
			print(S[ptr1:i])
			ptr1 = i
			count += 1
			found.remove(S[ptr1])
else:
	print('NO')


used = [False] * 26
k = int(input())
s = input()
n = len(s)
cnt = 0
border = [False] * n
for i in range(n):
	if cnt < k and (not used[ord(s[i]) - ord('a')]):
		border[i] = True
		used[ord(s[i]) - ord('a')] = True
		cnt += 1
if cnt == k:
	print('YES')
	for i in range(n):
		if i > 0 and border[i]:
			print()
		print(s[i], end='')
else:
	print('NO')


import sys
input = sys.stdin.readline
k = int(input())
s = input().strip()
a = set(s)
if len(a) < k:
	print('NO')
	exit()
print('YES')
ans = []
x = 0
use = set()
for i in range(len(s)):
	if k == 1:
		print(s[x:])
		exit()
	if s[i] in use:
		continue
	else:
		use.add(s[i])
		if x != i:
			print(s[x:i])
			k -= 1
		x = i
print(s[x:])


import sys
k = int(input())
s = input()
ans = []
lp = 0
d = [s[0]]
for i in range(0, len(s)):
	if i > 0 and s[i] not in d:
		ans.append(s[lp:i])
		lp = i
		k -= 1
		d.append(s[i])
	if k == 1:
		print('YES')
		for st in ans:
			print(st)
		print(s[lp:])
		sys.exit()
print('NO')


n = int(input())
string = input()
arr = list(string)
if len(set(arr)) < n:
	print('NO')
else:
	idx = 0
	ans = list()
	chars = set()
	while n > 0:
		n -= 1
		if n == 0:
			ans.append(string[idx:])
		else:
			chars.add(string[idx])
			start = idx
			idx += 1
			while idx < len(string) and string[idx] in chars:
				idx += 1
			ans.append(string[start:idx])
	print('YES')
	print('\n'.join(ans))


k = input()
word = input()
list = []
list2 = []
for i in word:
	if i not in list:
		list.append(i)
count = 0
if len(list) < int(k):
	print('NO')
else:
	print('YES')
	list = list[:int(k)]
	for i in range(len(word)):
		if word[i:i + 1] == list[count]:
			list2.append(i)
			count += 1
			if count == int(k):
				break
	for i in range(len(list2) - 1):
		string = word[list2[i]:list2[i + 1]]
		print(string)
	print(word[list2[len(list2) - 1]:])


n = int(input())
t = input()
s = set()
l = []
v = ''
for i in range(len(t)):
	if t[i] in s:
		continue
	s.add(t[i])
	l.append((t[i], i))
if len(s) >= n:
	print('YES')
	k = 0
	flag = 0
	for i in range(n - 1):
		flag = 1
		print(t[l[i][1]:l[i + 1][1]])
	if flag == 0:
		print(t[l[0][1]:])
	if flag == 1:
		print(t[l[i + 1][1]:])
else:
	print('NO')


n = int(input())
s = input()
ss = set(s)
sub = ''
if len(ss) < n:
	print('NO')
else:
	print('YES')
	ss = set([])
	ss.add(s[0])
	n -= 1
	for a in s:
		if a not in ss and n > 0:
			ss.add(a)
			print(sub)
			sub = a
			n -= 1
		else:
			sub = sub + a
print(sub)


(k, q) = (int(input()), input())
used = set()
words = []
for ch in q:
	if len(words) == k or ch in used:
		words[-1] += ch
	else:
		used.add(ch)
		words.append(ch)
if len(words) < k:
	print('NO')
else:
	print('YES', *words, sep='\n')


n = int(input())
s = input()
c = 0
L = []
atz = list('qwertyuiopasdfghjklzxcvbnm')
for ch in s:
	if c >= n:
		break
	if ch in atz:
		atz.remove(ch)
		c += 1
		L.append(s.find(ch))
if c < n:
	print('NO')
else:
	print('YES')
	L.append(len(s) + 1)
	for i in range(len(L) - 1):
		print(s[L[i]:L[i + 1]])


n = int(input())
q = input().strip()
seen = set(q[0])
subs = []
cur = 0
if len(set(q)) >= n:
	print('YES')
	for (i, j) in enumerate(q):
		if j not in seen:
			seen |= {j}
			subs += [q[cur:i]]
			cur = i
			n -= 1
		if n <= 1:
			subs += [q[cur:]]
			break
	print('\n'.join(subs))
else:
	print('NO')


k = int(input())
k2 = k
s = input()
if len(s) < k:
	print('NO')
else:
	res = []
	curr = dups = ''
	for (idx, el) in enumerate(s):
		if el not in dups:
			dups += el
			if len(curr) > 0:
				k -= 1
				res.append(curr)
			if k == 1:
				res.append(s[idx:])
				break
			curr = el
		else:
			curr += el
	if len(res) != k2:
		print('NO')
	else:
		print('YES')
		[print(el) for el in res]


n = int(input())
s = input()
c = set(s)
if len(c) < n:
	print('NO')
	exit()
idxs = []
print('YES')
for x in c:
	idxs.append(s.index(x))
idxs.sort()
idxs = idxs[:n] + [len(s)]
for i in range(len(idxs) - 1):
	print(s[idxs[i]:idxs[i + 1]])


k = int(input())
s = input()
if k > len(set(s)):
	print('NO')
else:
	print('YES')
	(u, c) = ([s[0]], 0)
	i = 0
	while c < k - 1:
		for x in s:
			if x not in u:
				print(s[:s.index(x)])
				u.append(x)
				s = s[s.index(x):]
				c += 1
				break
	print(s)


import sys

def main():
	k = int(input())
	w = input()
	mark = {}
	distict = 0
	for i in range(len(w)):
		if w[i] not in mark:
			mark[w[i]] = True
			distict += 1
	if distict < k:
		print('NO')
	else:
		curr = None
		print('YES')
		mark = {}
		for i in range(len(w)):
			if k == 0:
				sys.stdout.write(w[i])
			elif curr != w[i] and w[i] not in mark:
				curr = w[i]
				k -= 1
				mark[w[i]] = True
				if i != 0:
					print()
				sys.stdout.write(w[i])
			else:
				sys.stdout.write(w[i])
main()


k = int(input())
s = str(input())
n = len(set(s))
l = len(s)
dict = {}
if k == 1:
	print('YES')
	print(s)
elif k <= n and k != 0:
	print('YES')
	x = 0
	dict[s[0]] = 1
	for i in range(l):
		if s[i] in dict.keys():
			dict[s[i]] += 1
		else:
			dict[s[i]] = 1
			print(s[x:i])
			x = i
			k -= 1
			if k == 1:
				print(s[i:l])
				break
else:
	print('NO')


x = int(input())
st = input()
s = set(list(st))
if len(s) < x:
	print('NO')
	exit()
print('YES')
lal = []
for ch in st:
	if ch in s and x > 1:
		if len(lal) != 0:
			print(''.join(lal))
			x -= 1
		lal.clear()
		s.remove(ch)
	lal.append(ch)
print(''.join(lal))


(k, q, v, s) = (int(input()), input(), 'YES', set())
for ch in q:
	if k == 0 or ch in s:
		v += ch
	else:
		v += '\n' + ch
		s.add(ch)
		k -= 1
print('NO' if k else v)


k = int(input())
q = input()
l = len(q)
s = set()
s.add(q[0])
pos = [0]
count = 1
i = 1
while i < l and count < k:
	if not q[i] in s:
		pos.append(i)
		s.add(q[i])
		count += 1
	i += 1
if count == k:
	print('YES')
	pos.append(l)
	for i in range(k):
		print(q[pos[i]:pos[i + 1]])
else:
	print('NO')


n = int(input())
s = input()
ss = []
ls = set()
k = 0
cur = ''
for c in s:
	if k == n:
		cur += c
	elif c not in ls:
		ls.add(c)
		k += 1
		ss.append(cur)
		cur = c
	else:
		cur += c
ss.append(cur)
ss = ss[1:]
if k != n:
	print('NO')
else:
	print('YES')
	for st in ss:
		print(st)


def TrueCount(a):
	c = 0
	for i in a:
		if i == True:
			c += 1
	return c

def uniqueStrings(a, s):
	b = []
	c = []
	x = 0
	c.append(s[0])
	for i in range(len(s)):
		if s[i] not in c:
			b.append(s[x:i])
			c.append(s[i])
			x = i
	b.append(s[x:len(s)])
	return b
n = int(input())
s = input()
a = [False] * 26
for i in s:
	a[ord(i) - ord('a')] = True
k = TrueCount(a)
if k < n:
	print('NO')
else:
	print('YES')
	b = uniqueStrings(a, s)
	i = 0
	while i < n - 1:
		print(b[i])
		i += 1
	print(''.join(b[i:len(b)]))


import math

def solve():
	n = int(input())
	s = str(input())
	if n == 1:
		print('YES')
		print(s)
		return
	ck = [0 for i in range(200)]
	cnt = 0
	for i in range(len(s)):
		ck[ord(s[i])] += 1
		if ck[ord(s[i])] == 1:
			cnt += 1
	if cnt < n:
		print('NO')
		return
	print('YES')
	for i in range(200):
		ck[i] = 0
	tar = s[:1]
	ck[ord(s[0])] += 1
	for i in range(1, len(s)):
		ck[ord(s[i])] += 1
		if ck[ord(s[i])] == 1:
			n -= 1
			print(tar)
			tar = ''
			if n == 1:
				print(s[i:])
				return
		tar += s[i]
	if n:
		print(tar)
t = 1
while True:
	solve()
	t -= 1
	if t <= 0:
		break


n = int(input())
d = {}
st = input()
ans = ''
answer = []
t = 0
for (j, i) in enumerate(st):
	if i in d:
		continue
	else:
		d[i] = 1
		if n == 1:
			t = 1
			answer.append(j)
			break
		answer.append(j)
		n = n - 1
if t != 1:
	exit(print('NO'))
print('YES')
le = len(answer) - 1
for (i, j) in enumerate(answer):
	if i == le:
		print(st[answer[i]:len(st)])
		break
	print(st[answer[i]:answer[i + 1]])


class CodeforcesTask544ASolution:

	def __init__(self):
		self.result = ''
		self.k = 0
		self.q = ''

	def read_input(self):
		self.k = int(input())
		self.q = input()

	def process_task(self):
		if len(set(list([ord(c) for c in self.q]))) < self.k:
			self.result = 'NO'
		else:
			strings = []
			starts = set()
			for x in range(len(self.q)):
				if self.q[x] not in starts and len(starts) < self.k:
					starts.add(self.q[x])
					strings.append(self.q[x])
				else:
					strings[-1] += self.q[x]
			self.result = 'YES\n{0}'.format('\n'.join(strings))

	def get_result(self):
		return self.result
Solution = CodeforcesTask544ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


n = int(input())
s = input()
dic = {}
for i in s:
	if i in dic:
		dic[i] = dic[i] + 1
	else:
		dic[i] = 1
l = list(dic.keys())
output = []
if len(dic) < n:
	print('NO')
else:
	for j in range(n):
		if j == n - 1:
			a = s.find(l[j])
			output.append(s[a:len(s)])
		else:
			a = s.find(l[j])
			b = s.find(l[j + 1])
			output.append(s[a:b])
	print('YES')
	for k in range(n):
		print(output[k])


N = int(input())
X = input()
if len(set(X)) < N:
	print('NO')
	exit()
else:
	print('YES')
	Distinct = []
	Index = 0
	for i in range(N - 1):
		Result = ''
		Distinct.append(X[Index])
		while X[Index] in Distinct:
			Result += X[Index]
			Index += 1
		print(Result)
	print(X[Index:])


n = int(input())
a = input()
a1 = set(a)
if n > len(a1):
	print('NO')
else:
	lst = []
	for i in a1:
		lst.append(a.index(i))
	print('YES')
	if n == 1:
		print(a)
	else:
		lst.sort()
		for i in range(n - 1):
			print(a[lst[i]:lst[i + 1]])
		print(a[lst[n - 1]:])


number = int(input())
string = list(input())
lib = []
ans = 0
string_set = []
for i in range(len(string)):
	if not string[0] in lib:
		ans += 1
		lib.append(string[0])
		string_set.append(string.pop(0))
	else:
		string_set[-1] += string.pop(0)
	if ans == number or len(string) == 0:
		for j in range(len(string)):
			string_set[-1] += string[j]
		break
if ans == number:
	print('YES')
	for i in string_set:
		print(i)
else:
	print('NO')


n = int(input())
s = list(str(input()))
dif = list(dict.fromkeys(s))
ans = []
if n == 1:
	print('YES')
	print(''.join(s))
else:
	cur = 0
	pnt = 0
	lst = s[0]
	cnt = 1
	used = [s[0]]
	for i in range(len(s)):
		if s[i] not in used:
			if i == len(s) - 1 or cnt == n - 1:
				ans.append(''.join(s[cur:i]))
				ans.append(''.join(s[i:]))
				break
			else:
				ans.append(''.join(s[cur:i]))
			cur = int(i)
			cnt += 1
			used.append(s[i])
	if len(ans) == n:
		print('YES')
		for i in range(n):
			print(ans[i])
	else:
		print('NO')


n = int(input())
s = input()
if len(set(s)) < n:
	print('NO')
else:
	print('YES')
	ind = 0
	ss = set()
	for i in range(n - 1):
		ss.add(s[ind])
		tmp = ''
		while s[ind] in ss:
			tmp += s[ind]
			ind += 1
		print(tmp)
	print(s[ind:])


from string import *
n = int(input())
s = input()
indices = sorted([s.index(c) for c in ascii_lowercase if c in s])
if len(indices) < n:
	print('NO')
else:
	print('YES')
	indices += [len(s)]
	indices[n] = len(s)
	for i in range(n):
		print(s[indices[i]:indices[i + 1]])


k = int(input())
s = input()
se = set(s)
d = {}
for i in se:
	d[i] = 0
if len(se) < k:
	print('NO')
else:
	print('YES')
	i = 0
	while i < len(s) and k > 1:
		k -= 1
		d[s[i]] = 1
		while d[s[i]] == 1:
			print(s[i], end='')
			i += 1
		print()
	print(s[i:])


k = int(input())
q = input()

def program(k, q):
	if k > len(set(q)):
		print('NO')
		return
	used = []
	ss = []
	while len(q) > 0:
		ch = q[0]
		q = q[1:]
		if ch in used or k - len(ss) == 0:
			ss[-1] += ch
		else:
			ss.append(ch)
		used.append(ch)
	print('YES')
	for s in ss:
		print(s)
program(k, q)


n = int(input())
s = str(input())
sr = set(s[0])
li = 0
arr = []
for i in range(1, len(s)):
	ch = s[i]
	if ch not in sr:
		sr.add(ch)
		arr.append(s[li:i])
		li = i
arr.append(s[li:])
if len(arr) < n:
	print('NO')
else:
	print('YES')
	while len(arr) > n:
		r = arr.pop()
		s = arr.pop()
		arr.append(s + r)
	for x in arr:
		print(x)


K = int(input())
Q = input()
chars = set()
firstOcc = []
for i in range(len(Q)):
	if Q[i] not in chars:
		chars.add(Q[i])
		firstOcc.append(i)
if len(chars) < K:
	print('NO')
else:
	print('YES')
	index = 0
	for i in range(K):
		if i != K - 1:
			print(Q[firstOcc[i]:firstOcc[i + 1]])
		else:
			print(Q[firstOcc[i]:])


N = int(input())
q = input()
if len(set(q)) >= N:
	print('YES')
	chars = list(set(q))
	start = False
	for (index, c) in enumerate(q):
		if c in chars:
			if start is not False:
				print(q[start:index])
			N -= 1
			chars.remove(c)
			if N == 0:
				chars = []
			start = index
	else:
		print(q[start:])
else:
	print('NO')


n = int(input())
s = input()
d = {}
for i in range(97, 150):
	d[chr(i)] = True
ans = []
for i in s:
	if d[i]:
		d[i] = False
		ans.append(i)
	else:
		ans[ans.__len__() - 1] += i
if ans.__len__() < n:
	print('NO')
else:
	ans[n - 1] = ''.join(ans[n - 1:])
	print('YES')
	for i in range(n):
		print(ans[i])


n = int(input())
s = input()
arr = []
for i in range(len(s)):
	if s[i] not in s[:i]:
		arr.append(i)
if len(arr) < n:
	print('NO')
	exit()
print('YES')
for i in range(n - 1):
	print(s[arr[i]:arr[i + 1]])
if len(arr) >= n:
	print(s[arr[n - 1]:len(s)])


import sys
import math
import collections
import bisect

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_string():
	return sys.stdin.readline().strip()
for t in range(1):
	n = int(input())
	string = list(get_string())
	if len(set(string)) < n:
		print('NO')
		continue
	selected = set()
	selected.add(string[0])
	ans = []
	left = 0
	counted = 0
	for i in range(1, len(string) + 2):
		if counted == n - 1:
			sub_string = string[left:]
			ans.append(sub_string)
			break
		else:
			sub_string = string[left:i]
		if sub_string[-1] not in selected:
			selected.add(sub_string[-1])
			ans.append(sub_string[:len(sub_string) - 1])
			selected.add(sub_string[0])
			left = i - 1
			counted += 1
	print('YES')
	for i in ans:
		print(*i, sep='')


k = int(input())
q = input()
if len(set(q)) < k:
	print('NO')
	exit()
a = set()
cnt = l = r = 0
ans = []
while cnt < k - 1:
	if q[r] not in a:
		a.add(q[r])
		if q[l:r] != '':
			cnt += 1
			ans.append(q[l:r])
			l = r
	r += 1
ans.append(q[l:])
print('YES')
[print(i) for i in ans]


import sys
fin = sys.stdin
n = int(fin.readline())
s = fin.readline().strip()
i = 1
cur = 0
used = {c: False for c in 'qwertyuiopasdfghjklzxcvbnm'}
starts = [0]
used[s[0]] = True
while i < len(s) and cur < n - 1:
	if not used[s[i]]:
		used[s[i]] = True
		starts.append(i)
		cur += 1
	i += 1
if cur < n - 1:
	print('NO')
else:
	print('YES')
	starts.append(len(s))
	for i in range(len(starts) - 1):
		print(s[starts[i]:starts[i + 1]])


import sys
import math
import itertools
import collections

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def wr(arr):
	return '\n'.join(map(str, arr))

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)
k = ii()
s = input()
sets = set(s)
if len(sets) < k:
	print('NO')
else:
	pos = [s.find(item) for item in sets]
	pos.sort()
	print('YES')
	for i in range(k - 1):
		print(s[pos[i]:pos[i + 1]])
	print(s[pos[k - 1]:])


k = int(input())
st = input()
ln = len(st)
if k == 1:
	print('YES')
	print(st)
elif k > ln:
	print('NO')
else:
	letset = set()
	indexlist = []
	for i in range(ln):
		if st[i] not in letset:
			letset.add(st[i])
			indexlist.append(i)
	if len(letset) < k:
		print('NO')
	else:
		print('YES')
		for i in range(k - 1):
			print(st[indexlist[i]:indexlist[i + 1]])
		print(st[indexlist[k - 1]:])


k = int(input())
s = str(input())
if len(set(s)) < k:
	print('NO')
	exit()
print('YES')
cset = set()
ans = ''
for c in s:
	if c not in cset and k > 1:
		if ans != '':
			print(ans)
			k -= 1
		cset.add(c)
		ans = ''
	ans += c
else:
	print(ans)