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

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {


        public void solve(int testNumber, InputReader in, PrintWriter out) {
            in.NextInt();
            char[] s = in.Next().toCharArray();
            int[] charCount = new int[256];
            for (char c : s) {
                charCount[c]++;
            }
            int oddCount = 0;
            for (int i : charCount) {
                if (i % 2 != 0) oddCount++;
            }
            if (oddCount == 0) {
                int t = 0;
                for (int i = 0; i < s.length / 2; i++) {
                    while (charCount[t] == 0) {
                        t++;
                    }
                    s[i] = (char) (t);
                    s[s.length - 1 - i] = s[i];
                    charCount[t] -= 2;
                }
                out.println(1);
                out.println(s);
                return;
            }
            for (int i = oddCount; i < s.length; i++) {
                if (s.length % i == 0) {
                    int pLength = s.length / i;
                    if (pLength % 2 == 1) {
                        out.println(s.length / pLength);
                        char[] t = new char[pLength];
                        for (int j = 0; j < s.length / pLength; j++) {
                            int c = 0;
                            for (int k = 0; k < (pLength - 1) / 2; k++) {
                                while (charCount[c] < 2) {
                                    c++;
                                }
                                t[k] = (char) (c);
                                t[pLength - 1 - k] = (char) (c);
                                charCount[c] -= 2;
                            }
                            c = 0;
                            while (c < 256 && charCount[c] % 2 == 0) {
                                c++;
                            }
                            if (c == 256) {
                                c = 0;
                                while (charCount[c] == 0) {
                                    c++;
                                }
                            }
                            t[pLength / 2] = (char) (c);
                            charCount[c]--;
                            out.print(t);
                            out.print(" ");
                        }
                        out.println();
                        return;
                    }
                }
            }
            //nothing found.
            out.println(s.length);
            for (char c : s) {
                out.print("" + (char) c + " ");
            }
            out.println();
        }
    }

    public static int GetMax(int[] ar) {
        int max = Integer.MIN_VALUE;
        for (int a : ar) {
            max = Math.max(max, a);
        }
        return max;
    }

    public static int[] GetCount(int[] ar) {
        return GetCount(ar, GetMax(ar));
    }

    public static int[] GetCount(int[] ar, int maxValue) {
        int[] dp = new int[maxValue + 1];
        for (int a : ar) {
            dp[a]++;
        }
        return dp;
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String Next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int NextInt() {
            return Integer.parseInt(Next());
        }

        public long NextLong() {
            return Long.parseLong(Next());
        }

        public double NextDouble() {
            return Double.parseDouble(Next());
        }

        public int[] NextIntArray(int n) {
            return NextIntArray(n, 0);
        }

        public int[] NextIntArray(int n, int offset) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = NextInt() - offset;
            }
            return a;
        }

        public int[][] NextIntMatrix(int n, int m) {
            return NextIntMatrix(n, m, 0);
        }

        public int[][] NextIntMatrix(int n, int m, int offset) {
            int[][] a = new int[n][m];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    a[i][j] = NextInt() - offset;
                }
            }
            return a;
        }
    }
}