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

Solution:
# -*- coding: utf-8 -*-

import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys

"""
created by shhuan at 2017/10/22 18:15

"""

N = int(input())
S = input()

def split(s, wc, pl, n):

    ans = []

    if pl % 2 == 0:
        if any([x % 2 == 1 for x in wc.values()]):
            return []
        for i in range(0, len(s), pl):
            t = s[i:i + pl]
            ans.append(t[::2] + t[::-1][::2])

        return ans

    mid = [w for w, c in wc.items() if c % 2 == 1]

    if len(mid) > n:
        return []

    midindex = 0
    while len(ans) < n:
        t = ''
        u = mid[midindex] if midindex < len(mid) else ''
        midindex += 1
        if not u:
            u = list([w for w, c in wc.items() if c > 0])[0]
        wc[u] -= 1

        need = pl-1
        while need > 0:
            pneed = need
            for w, c in [(w, c) for w, c in wc.items()]:
                if c > need:
                    t += str(w) * (need//2)
                    wc[w] -= need
                    need = 0
                    break
                elif c > 1:
                    c //= 2
                    t += str(w) * c
                    wc[w] -= c * 2
                    need -= c*2
            if need == pneed:
                return []
        t = t + u + t[::-1]
        if len(t) < pl:
            return []
        ans.append(t)

    return ans




S = "".join(sorted(list(S)))
WC = collections.Counter(S)

for parts in range(1, N+1):
    if N % parts == 0:
        wc = {k: v for k, v in WC.items()}
        ans = split(S, wc, N//parts, parts)
        if ans:
            print(parts)
            print(" ".join(ans))
            exit(0)