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

Solution:
import java.io.BufferedInputStream;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

/**
 * Created by leen on 23/10/2017.
 */
public class _883H {


    private static int char2num(char c) {
        if(c >= 'A' && c <= 'Z')
            return c-'A';
        else if(c >= 'a' && c <= 'z')
            return 26+(c-'a');
        else
            return 52+(c-'0');
    }

    private static char num2char(int num) {
        if(num < 26)
            return (char)('A' + num);
        else if(num < 52)
            return (char)('a' + (num - 26));
        else
            return (char)('0' + (num - 52));
    }

    public static void main(String[] args) {
        int numLetters = 62;
        int[] letterCnt = new int[numLetters];

        Scanner scan = new Scanner(new BufferedInputStream(System.in, 1024*1024));

        int n = scan.nextInt();
        scan.nextLine();

        String s = scan.nextLine();
        for(int i = 0; i < n; i++)
            letterCnt[char2num(s.charAt(i))]++;

        List<Integer> centers = new ArrayList<>();

        for(int i = 0; i < numLetters; i++) {
            if (letterCnt[i] % 2 == 1) {
                letterCnt[i]--;
                centers.add(i);
            }
        }

        int numPairs = (n - centers.size()) / 2;

        if(!centers.isEmpty()) {
            int p = 0;
            while (numPairs % centers.size() != 0) {
                while (letterCnt[p] > 0 && numPairs % centers.size() != 0) {
                    centers.add(p);
                    centers.add(p);
                    letterCnt[p] -= 2;
                    numPairs--;
                }
                p++;
            }
        }

        StringBuilder buf = new StringBuilder();

        if(centers.isEmpty()) {
            printPalindrome(buf, -1, numPairs, letterCnt);
        }
        else {
            for(int center : centers) {
                if(buf.length() > 0)
                    buf.append(' ');
                printPalindrome(buf, center, numPairs/centers.size(), letterCnt);
            }
        }

        System.out.println(Math.max(1, centers.size()));
        System.out.println(buf.toString());

    }

    static void printPalindrome(StringBuilder buf, int center, int numPairs, int[] letterCnt) {
        LinkedList<Integer> stack = new LinkedList<>();

        int p = 0;
        while(numPairs > 0) {
            while(letterCnt[p] > 0 && numPairs > 0) {
                numPairs--;
                letterCnt[p]-=2;
                buf.append(num2char(p));
                stack.push(p);
            }
            p++;
        }

        if(center != -1)
            buf.append(num2char(center));

        while(!stack.isEmpty())
            buf.append(num2char(stack.pop()));
    }

}