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.*;
import java.util.*;
public class Main {
    public static void main(String args[])
    {
        FastReader input=new FastReader();
        PrintWriter out=new PrintWriter(System.out);
        int T=1;
        while(T-->0)
        {
            int n=input.nextInt();
            String s=input.next();
            int arr[]=new int[123];
            for(int i=0;i<n;i++)
            {
                arr[s.charAt(i)]++;
            }
            int count=0;
            for(int i=0;i<arr.length;i++)
            {
                if(arr[i]%2!=0)
                {
                    count++;
                }
            }
            if(count==0)
            {
                char ch[]=new char[n];
                int x=0;
                int j=0;
                while(j<n/2)
                {
                    if(arr[x]>=2)
                    {
                        ch[j]=(char)(x);
                        ch[n-1-j]=(char)(x);
                        arr[x]-=2;
                        j++;
                    }
                    else
                    {
                        x++;
                    }
                }
                out.println(1);
                out.println(ch);
            }
            else
            {
                int parts=0;
                for(int i=count;i<=n;i++)
                {
                    if(n%i==0 && (n/i)%2!=0)
                    {
                        parts=i;
                        break;
                    }
                }
                int len=n/parts;
                char ch[][]=new char[parts][len];
                int x=0;
                for(int i=0;i<ch.length;i++)
                {
                    int j=0;
                    while(j<len/2)
                    {
                        if(arr[x]>=2)
                        {
                            ch[i][j]=(char)(x);
                            ch[i][len-1-j]=(char)(x);
                            arr[x]-=2;
                            j++;
                        }
                        else
                        {
                            x++;
                        }
                    }
                }
                x=0;
                int j=0;
                while(j<ch.length)
                {
                    if(arr[x]>0)
                    {
                        ch[j][len/2]=(char)(x);
                        arr[x]--;
                        j++;
                    }
                    else
                    {
                        x++;
                    }
                }
                out.println(parts);
                for(int i=0;i<ch.length;i++)
                {
                    StringBuilder sb=new StringBuilder(String.copyValueOf(ch[i]));
                    out.print(sb.toString()+" ");
                }
                out.println();
            }
        }
        out.close();
    }
    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;
        }
    }
}