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 PYTHON):

Solution:
from fractions import Fraction

letters = {}

n = int(raw_input())
string = raw_input()

for char in string:
	if letters.get(char, -1) == -1:
		letters[char] = 0
	letters[char] += 1

odd = []
even = {}

for char, num in letters.iteritems():
	if num % 2 != 0:
		odd.append(char)
		if num != 1:
			even[char] = (num - 1)
	else:
		even[char] = num

odd_sum = len(odd)
even_sum = sum(even.values())

splits = n
if odd_sum != 0 and even_sum != 0:
	if (float(even_sum) / odd_sum) == float(even_sum / odd_sum) and (even_sum / odd_sum) % 2 == 0:
		splits = odd_sum
	else:
		splits = n
elif odd_sum == 0:
	splits = 1

change = 0

while odd_sum < even_sum and splits == n:
	odd_sum += 2
	even_sum -= 2
	change += 2
	splits = n
	if odd_sum != 0 and even_sum != 0:
		if (float(even_sum) / odd_sum) == float(even_sum / odd_sum) and (even_sum / odd_sum) % 2 == 0:
			splits = odd_sum
		else:
			splits = n
	elif odd_sum == 0:
		splits = 1

temp_collected = 0
temp_str = ""
for char, value in even.iteritems():
		if temp_collected == change:
			break
		if value - (change - temp_collected) < 0:
			temp_collected += value
			temp_str += (char * value)
			even[char] = 0
		else:
			temp_str += (char * (change - temp_collected))
			even[char] = (value - (change - temp_collected))
			temp_collected = change
for char in temp_str:
	odd.append(char)


print(splits)
per_split = n / splits

if splits == n:
	for i in string:
		print i,

else:
	for i in range(odd_sum):
		string = odd[i]
		temp_collected = 0
		temp_str = ""
		needed = (per_split - 1) / 2
		for char, num in even.iteritems():
			if temp_collected == needed:
				break
			if num != 0:
				if num - ((needed - temp_collected) * 2) < 0:
					temp_collected += (num/2)
					temp_str += (char * (num/2))
					even[char] = 0
				else:
					temp_str += (char * (needed - temp_collected))
					even[char] = (num - ((needed - temp_collected) * 2))
					temp_collected = needed
		print temp_str + string + temp_str[::-1],

	for i in range(splits - odd_sum):
			temp_collected = 0
			temp_str = ""
			needed = per_split / 2
			for char, num in even.iteritems():
				if temp_collected == needed:
					break
				if num != 0:
					if num - ((needed - temp_collected) * 2) < 0:
						temp_collected += (num/2)
						temp_str += (char * (num/2))
						even[char] = 0
					else:
						temp_str += (char * (needed - temp_collected))
						even[char] = (num - ((needed - temp_collected) * 2))
						temp_collected = needed
			print temp_str + temp_str[::-1],