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.*;

public class TaskH {

    private static BufferedReader in;
    private static StringTokenizer tok;
    private static PrintWriter out;

    public static String readToken() throws IOException {
        while (tok == null || !tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    public static int readInt() throws IOException {
        return Integer.parseInt(readToken());
    }

    public static void main(String[] args) throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        run();
        in.close();
        out.close();
    }

    public static final int CHAR_COUNT = 257;

    public static void run() throws IOException {
        int n = readInt();
        int[] counts = new int[CHAR_COUNT];
        Deque<Character> middle = new ArrayDeque<>();
        String s = in.readLine();
        for (int i = 0; i < n; i++) {
            counts[s.charAt(i)]++;
        }
        int k = 0;  // количество нечетных
        for (int i = 0; i < CHAR_COUNT; i++) {
            if (counts[i] % 2 != 0) {
                counts[i]--;
                middle.push((char) i);
                k++;
            }
        }
        if (k == 0) {
            out.println(1);
            StringBuilder str = new StringBuilder();
            for (char c = 0; c < CHAR_COUNT; c++) {
                for (int i = 0; i < counts[c] / 2; i++)
                    str.append(c);
            }
            out.println(str.toString() + str.reverse().toString());
        } else {
            while (n % k != 0 || (n / k) % 2 == 0) {
                char ch = 0;
                for (char c = 0; c < CHAR_COUNT; c++) {
                    if (counts[c] >= 2) {
                        ch = c;
                        counts[c] -= 2;
                        break;
                    }
                }
                middle.push(ch);
                middle.push(ch);
                k += 2;
            }
            out.println(k);
            int m = n / k - 1;
            for (int i = 0; i < k; i++) {
                StringBuilder str = new StringBuilder();
                int j = m;
                for (char c = 0; c < CHAR_COUNT; c++) {
                    if (counts[c] > 0) {
                        if (counts[c] >= j) {
                            for (int jj = 0; jj < j / 2; jj++) {
                                str.append(c);
                            }
                            counts[c] -= j;
                            j = 0;
                        } else {
                            for (int jj = 0; jj < counts[c] / 2; jj++) {
                                str.append(c);
                            }
                            j -= counts[c];
                            counts[c] = 0;
                        }
                        if (j == 0) break;
                    }
                }
                out.print(str.toString() + middle.pop() + str.reverse().toString() + " ");
            }
        }
    }
}