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:
import sys

def even(a):
    return a % 2 == 0

def odd(a):
    return a % 2 <> 0

def solve(s):
    counts = {}
    for c in s:
        if c not in counts: counts[c] = 0
        counts[c] += 1
    n = len(s)
    nodd = 0
    neven = 0
    for c in counts:
        if even(counts[c]):
            neven += 1
        else:
            nodd += 1
    for k in xrange(1,n+1):
        if n % k <> 0: continue
        m = n // k  # size of each part
        # print "--- n:", n, "k:", k, "m:", m
        sol = try_palindrome(counts, nodd, k, m)
        if sol:
            print len(sol)
            print ' '.join(sol)
            return

def try_palindrome(counts, nodd, k, m):
    if even(m):
        return try_even(counts, nodd, k, m)
    else:
        return try_odd(counts, nodd, k, m)

def try_even(counts, nodd, k, m):
    # assert: m even
    # print "try_even m: {}, counts: {}".format(m, counts)
    if nodd: return None
    return [ h + h[::-1] for h in even_pals(counts, m) ]

def try_odd(counts, nodd, k, m):
    # print "try_odd  m: {}, counts: {}".format(m, counts)
    # assert: m odd
    if (k < nodd) or odd(k - nodd):
        return None
    centers = []
    for c in counts:
        if odd(counts[c]):
            counts[c] -= 1
            centers.append(c)
    # print "centers: {}  counts: {} k: {}".format(centers, counts, k)
    for c in counts:
        used = max(0, min(counts[c], k - len(centers)))
        counts[c] -= used
        centers.extend([c] * used)
        if len(centers) >= k:
            break
    halfs = even_pals(counts, m-1)
    if len(halfs) == 0:
        halfs = [ '' ] * k
    return [ h + c + h[::-1] for c, h in zip(centers, halfs) ]

# create even palindromes of length m
def even_pals(counts, m):
    # assert: m even and no counts[c] is odd
    pals = []
    pal = []
    plen = 0
    for c, cm in counts.iteritems():
        while cm > 0:
            used = min(m - plen, cm)
            if used:
                # add c * take to current palindrome
                counts[c] -= used
                pal.append( (c, used) )
                plen += used 
                if plen >= m:
                    pals.append(pal)
                    pal = []
                    plen = 0
            cm -= used
    # assert: plen == 0, pal == []
    return [ ''.join([ (c * (used // 2)) for c, used in pal ]) for pal in pals ]

# solve("aaaaaaaaaaaa")
# solve("aaaaaaaaaaab")
# solve("ccaaaaaaaab")
# solve("aA")
if __name__ == "__main__":
    n = int( sys.stdin.readline() )
    s = sys.stdin.readline().strip()
    solve(s)
# solve("aabaac")
# solve("0rTrT022")