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 math import *
from fractions import gcd
from itertools import *
import string
import random
def id_generator(size=20, chars=string.digits):
    return ''.join(random.choice(chars) for _ in range(size))

def mp():
    return map(int,str(raw_input()).split())

n=input()
s=str(raw_input())
#n=20
#s='54334701561101776710'
#n=len(s)
#print n
#print s
d={'':0}
for i in range(n):
    try:
        if d[s[i]]:
            d[s[i]]+=1
    except:
        d[s[i]]=1
#print d
ans=0
for i in d:
    if d[i]%2==1:
        ans+=1
ans=max(ans,1)
z=[]
for i in range(1,int(sqrt(n))+2):
    if n%i==0:
        z+=[i]
        z+=[n/i]
z=list(set(z))
z.sort()
val=ans
for i in z:
    if ans==1:
        break
    elif i==ans and (n/i)%2==1:
        break
    elif i>ans and (n/i)%2==1:
        val=i
        break
l=[['' for i in range(n/val)] for j in range(val)]
j=0
if n/val==1:
    print n
    for i in s:
        print i,
    exit()

if (n/val)%2==1:
    for i in d:
        if d[i]%2==1:
            l[j][n/(2*val)]=i
            d[i]-=1
            j+=1
    while j<val:
        if l[j][n/(2*val)]=='':
            for i in d:
                if d[i]>0:
                    #print j,val
                    l[j][n/(2*val)]=i
                    l[j+1][n/(2*val)]=i
                    d[i]-=2
                    j+=2
                    break
                    

    #print l,d
    for i in range(val):
        k=1
        q=n/(2*val)
        flag=0
        #while (q+k)<(n/val):
        for ii in d:
            while d[ii]>0:
                #print i,q,k
                l[i][q+k]=ii
                l[i][q-k]=ii
                d[ii]-=2
                k+=1
                if (q+k)>=(n/val):
                    flag=1
                    break
            if flag:
                break

else:
    for i in range(val):
        k=1
        q=n/(2*val)
        flag=0
        for ii in d:
            while d[ii]>0:
                l[i][q+k-1]=ii
                l[i][q-k]=ii
                d[ii]-=2
                k+=1

                if (q+k-1)>=(n/val):
                    flag=1
                    break
            if flag:
                break


print len(l) #,l
for i  in l:
    s=''
    for j in i:
        s+=j
    print s,