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 collections import *
n = input()
s = raw_input()
c = Counter(s)
odd = []
even = []
for k in c.keys():
    if c[k]&1:
        odd.append(k)
    else:
        even.append(k)
if len(odd)==0:
    ans = []
    ans_s = ''
    for k in c.keys():
        ans_s = k*(c[k]/2)+ans_s+k*(c[k]/2)
    ans.append(ans_s)
elif len(odd)>(n/3):
    ans = list(s)
else:
    l_each = 1
    a_each = l_each
    while l_each<=n:
        if n%l_each==0 and (n/l_each)%2==len(odd)%2 and len(odd)<=(n/l_each):
            a_each = l_each
        l_each += 2
    a_each = min(n,a_each)
    if a_each==1 or len(odd)>(n/a_each):
        ans = list(s)
    else:
        ans = ['']*(n/a_each)
        mod = n/a_each
        i = 0
        while i<len(odd):
            ans[i] += odd[i]
            c[odd[i]] -=1
            i+=1
        i = len(odd)
        
        even = c.keys()
        eind = 0
        while eind<len(even) and i<(n/a_each-1):
            if c[even[eind]]>0:
                ans[i] += even[eind]
                ans[i+1] += even[eind]
                c[even[eind]] -= 2
            if c[even[eind]]==0:
                eind += 1
            i+=2
        ind = 0
        for k in c.keys():
            while c[k]%2==0 and c[k]>0:
                need = a_each-len(ans[ind%mod])
                have = c[k]
                canbe = min(need,have)
                ans[ind%mod] = (canbe/2)*k+ans[ind%mod]+(canbe/2)*k
                c[k]-=canbe
                if len(ans[ind%mod])==a_each:
                    ind += 1        

print len(ans)
print " ".join(ans)