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.ArrayList;
import java.util.StringTokenizer;

public class pr883H {
    public static void main(String[] args) {
        FastScanner in = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();
        char[] c = in.next().toCharArray();


        solve(n, c, out);
        out.flush();
        out.close();
    }

    private static void solve(int n, char[] c, PrintWriter out) {
        int[] cnt = new int[256 + 3];

        for (int i = 0; i < n; i++) {
            cnt[(int)c[i]]++;
        }

        char[] ans;
        StringBuilder oddChar = new StringBuilder();
        StringBuilder evenChar = new StringBuilder();
        for (int i = 0; i <= 256 ; i++) {
            if(cnt[i] > 0) {
                if(cnt[i] % 2 == 1) {
                    oddChar.append((char)i);
                    cnt[i]--;
                }
                while(cnt[i] > 0) {
                    evenChar.append((char)i);
                    cnt[i] -= 2;
                }
            }
        }
        char[] odd;
        char[] even;
        if(oddChar.length() == 0) {
            even = evenChar.toString().toCharArray();
            out.println(1);
            ans = new char[n];
            for (int i = 0; i < n / 2; i++) {
                ans[i] = ans[n-i-1] = even[i];
            }
            out.println(new String(ans));
            return;
        }
        while(evenChar.length() % oddChar.length() != 0) {
            int l = evenChar.length()-1;
            oddChar.append(evenChar.charAt(l));
            oddChar.append(evenChar.charAt(l));
            evenChar.deleteCharAt(l);
        }

        even = evenChar.toString().toCharArray();
        odd = oddChar.toString().toCharArray();
        int len = n / odd.length;
        out.println(n / len);
        ans = new char[len];
        int j = 0;
        for (int i = 0; i < odd.length; i++) {
            ans[len/2] = odd[i];

            for (int k = 0; k < len / 2; k++) {
                ans[k] = ans[len-k-1] = even[j++];
            }
            out.print(new String(ans) + " ");
        }

    }

    static class FastScanner
    {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner()
        {
            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;
        }
    }
}