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:
n = int(raw_input())
import logging
logging.basicConfig(level=logging.ERROR)
s = str(raw_input())
from collections import Counter
c = Counter()
for char in s:
    c[char] += 1

even_count = len([char for char in c if c[char] % 2 == 0])
odd_count = len(c) - even_count

def simple_even(c):
    s = ""
    for char in c:
        l = c[char] / 2
        s = l*char + s + l*char
    return s

def weird_odd(c, n, k):
    
    #print "k = %d" % k
    # initialize odds
    d = {}
    for i in range(k):
        d[i] = Counter()
        odd_boi = None
        for char in c:
            if c[char] % 2 == 1 and odd_boi == None:
                odd_boi = char
        if odd_boi == None:
            for char in c:
                if c[char] > 0:
                    odd_boi = char
                    break
        if odd_boi == None:
            return None
        d[i][odd_boi] = 1
        c[odd_boi] -= 1
    #print d
    #print c
    min_length = n // k
    #print "min_length %d" % min_length
    logging.debug((n, k))
    logging.debug(d)
    for i in d:
        left = min_length - 1
        logging.debug("left = %d" % left) 

        while left > 0:
            for char in c:
                if left == 0:
                    break
                if c[char] == 0:
                    continue
                if c[char] >= left:
                    d[i][char] += left
                    c[char] -= left
                    left = 0
                else:
                    left -= c[char]
                    d[i][char] += c[char]
                    c[char] = 0
        #print d[i]
    #print d
    def make_pal(counts):
        odd_boi = [c for c in counts if counts[c] % 2 == 1]
        #print odd_boi
        if len(odd_boi) > 1:
            return None 
        odd_boi = odd_boi[0]
        s = str(odd_boi * counts[odd_boi])
        counts[odd_boi] = 0
        for c in counts:
            l = counts[c] / 2
            s = l*c + s + l*c
        return s

    #print k, d
    words = []
    for i in d:
        w = make_pal(d[i])
        if w == None:
            return None
        words.append(w)
    return " ".join(words)
        
            
#print "odd count %d" % odd_count
if odd_count == 0:
    print 1
    print simple_even(c)

else:
    k = odd_count
    logging.debug("odd count = %d" % k)
    solved = False
    while k <= n:
        if n % k == 0 and (n // k) % 2 == 1:
            print k
            if k == n:
                print " ".join([c for c in s])
            else:
                print weird_odd(c, n, k)
            break
        else:
            k += 1