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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

import static java.lang.Math.sqrt;

public class SolutionH extends Thread {
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                                            InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    private static final FastReader scanner = new FastReader();
    private static final PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        solve();
        out.close();
    }


    public static List<Integer> getDivisorsOfN(int n) {
        List<Integer> result = new ArrayList<>();

        result.add(1);

        if (n != 1) {
            result.add(n);
        }

        for (int i = 2; i <= sqrt(n); i++) {
            if (n % i == 0) {
                result.add(i);

                if (n / i != i) {
                    result.add(n / i);
                }
            }
        }

        return result;
    }

    private static void solve() {
        int n = scanner.nextInt();
        List<Integer> divisors = getDivisorsOfN(n);
        Collections.sort(divisors);
        String s = scanner.next();
        int[] distr = new int[123];
        for (char c: s.toCharArray()) {
            distr[c]++;
        }

        List<Character> middleChar = new ArrayList<>();
        int amountOddParity = 0;
        for (int i = 0; i < 123; i++) {
            if (distr[i] % 2 == 1) {
                amountOddParity++;
                middleChar.add((char) i);
                distr[i]--;
            }
        }

        if (amountOddParity == 0) {
            out.println(1);
            int pointerChars = 0;
            char[] string = new char[n];
            for (int j = 0; j < n / 2; j++) {
                while (distr[pointerChars] == 0) {
                    pointerChars++;
                }
                string[j] = (char) pointerChars;
                string[n - 1 - j] = (char) pointerChars;
                distr[pointerChars] -= 2;
            }
            StringBuilder output = new StringBuilder();
            for (int j = 0; j < n; j++) {
                output.append(string[j]);
            }
            out.println(output);
            return;
        }

        int amountPalindromes = n;
        for (Integer divisor : divisors) {
            if (divisor >= amountOddParity && (n / divisor) % 2 == 1 && (divisor - amountOddParity) % 2 == 0) {
                amountPalindromes = divisor;
                break;
            }
        }

        int palindromeLength = n / amountPalindromes;
        if (middleChar.size() < amountPalindromes && palindromeLength % 2 == 1) {
            char_iteration:
            for (int i = 0; i < 123; i++) {
                while (distr[i] > 0) {
                    middleChar.add((char) i);
                    middleChar.add((char) i);
                    distr[i] -= 2;
                    if (middleChar.size() >= amountPalindromes) {
                        break char_iteration;
                    }
                }
            }
        }
        int pointerChars = 0;
        StringBuilder output = new StringBuilder();
        for (int i = 0; i < amountPalindromes; i++) {
            char[] string = new char[palindromeLength];
            string[palindromeLength/2] = middleChar.get(i);
            for (int j = 0; j < palindromeLength/2; j++) {
                while (distr[pointerChars] == 0) {
                    pointerChars++;
                }
                string[j] = (char) pointerChars;
                string[palindromeLength - 1 - j] = (char) pointerChars;
                distr[pointerChars] -= 2;
            }
            for (int j = 0; j < palindromeLength; j++) {
                output.append(string[j]);
            }
            output.append(" ");
        }

        out.println(amountPalindromes);
        out.println(output);
    }

    //REMINDERS:
    //- CHECK FOR INTEGER-OVERFLOW BEFORE SUBMITTING

    //- CAN U BRUTEFORCE OVER SOMETHING, TO MAKE IT EASIER TO CALCULATE THE SOLUTION
}