Problem: Kolya has a string s of length n consisting of lowercase and uppercase Latin letters and digits.

He wants to rearrange the symbols in s and cut it into the minimum number of parts so that each part is a palindrome and all parts have the same lengths. A palindrome is a string which reads the same backward as forward, such as madam or racecar.

Your task is to help Kolya and determine the minimum number of palindromes of equal lengths to cut s into, if it is allowed to rearrange letters in s before cuttings.

Input

The first line contains an integer n (1 ≤ n ≤ 4·105) — the length of string s.

The second line contains a string s of length n consisting of lowercase and uppercase Latin letters and digits.

Output

Print to the first line an integer k — minimum number of palindromes into which you can cut a given string.

Print to the second line k strings — the palindromes themselves. Separate them by a space. You are allowed to print palindromes in arbitrary order. All of them should have the same length.

Examples

Input

6
aabaac


Output

2
aba aca 

Input

8
0rTrT022


Output

1
02TrrT20 

Input

2
aA


Output

2
a A 

Solution (in PYTHON3):

Solution:
import sys
import math
from collections import defaultdict,deque
def is_possible(odd,even):
	each = odd*2
	if even % each == 0:
		return True
	return False
n=int(sys.stdin.readline())
s=sys.stdin.readline()[:-1]
dic=defaultdict(int)
for i in range(n):
	dic[s[i]]+=1
odd,even = 0,0
for i in dic:
	if dic[i]%2 != 0:
		odd += 1
		even += dic[i] - 1
	else:
		even += dic[i]
if odd == 0:
	#print(0)
	ans = [0 for x in range(even)]
	cnt = 0
	for i in dic:
		while dic[i] > 0:
			ans[cnt] = i
			ans[even - cnt - 1] = i
			cnt += 1
			dic[i] -= 2
	#print(ans)
	print(1)
	print(''.join(x for x in ans))
	sys.exit()
while even >= 0:
	if is_possible(odd,even):
		break
	odd += 2
	even -= 2
length = 1 + (even) // (odd)
#print(length, 'length')
ans = [deque() for _ in range(odd)]
ansb = [[] for _ in range(odd)]
ansa = [[] for _ in range(odd)]
cnt = 0
#print(dic,'dic')
for i in dic:
	if dic[i] % 2 !=0:
		ans[cnt].append(i)
		dic[i] -= 1
		cnt += 1
#print()
#print(ans,' after odd',cnt)
for i in dic:
	while dic[i] > 0:
		if cnt >= odd:
			break
		ans[cnt].append(i)
		ans[cnt + 1].append(i)
		cnt += 2
		dic[i] -= 2
	if cnt >= odd:
		break
cnt = 0
#print(ans,'ans')
for i in dic:
	#print(cnt,'cnt',i,'i')
	#print(ans[cnt])
	if dic[i] > 0:
		x = len(ans[cnt])
		while dic[i] > 0:
			ans[cnt].appendleft(i)
			ans[cnt].append(i)
			#ans[cnt] = [i] + ans[cnt] + [i]
			dic[i] -= 2
			x += 2
			if x < length:
				pass
			else:
				cnt += 1
				if cnt < odd:
					x = len(ans[cnt])
#print(ans,'ans')
#print(odd,'odd')
n = len(ans)
#print(n)
l =[]
for i in range(n):
	l.append(''.join(x for x in ans[i]))
print(n)
print(*l)