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

import static java.lang.Math.abs;
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.util.Arrays.copyOf;
import static java.util.Arrays.fill;
import static java.util.Arrays.sort;
import static java.util.Collections.asLifoQueue;
import static java.util.Collections.reverseOrder;
import static java.util.Collections.sort;

public class Main {
    private FastScanner in;
    private PrintWriter out;

    private void solve() throws IOException {
        // 48 57 97 122 65 90
        int[] k = new int[123];
        int n = in.nextInt();
        char[] t = in.nextLine().toCharArray();
        for (char c : t)
            k[c]++;

        int cnt = 0;
        ArrayList<Character> c = new ArrayList<>();
        for (int i = 48; i < k.length; i++)
            if (k[i] % 2 == 1) {
                k[i]--;
                c.add((char) i);
                cnt++;
            }

        if (cnt < 2) {
            StringBuilder sb = new StringBuilder();
            for (int i = 48; i < k.length; i++)
                if (k[i] > 0)
                    for (int j = 0; j < k[i] / 2; j++)
                        sb.append((char) i);

            if (cnt == 1) sb.append(c.get(0));

            for (int i = k.length - 1; i >= 48; i--)
                if (k[i] > 0)
                    for (int j = 0; j < k[i] / 2; j++)
                        sb.append((char) i);

            out.println("1\n" + sb.toString());
            return;
        }

        n = (n - cnt) / 2;
        while (n % cnt != 0)
            for (int i = 48; i < k.length; i++)
                if (k[i] > 0) {
                    k[i] -= 2;
                    cnt += 2;
                    n--;
                    c.add((char) i);
                    c.add((char) i);
                    break;
                }

        out.println(cnt);
        StringBuilder sb = new StringBuilder();
        int kk = 0, len = n / cnt;
        for (char cc : c) {
            sb.delete(0, sb.length());
            kk = 0;
            for (int i = 0; i < k.length; i++)
                while (kk < len && k[i] > 0) {
                    kk++;
                    sb.append((char) i);
                    sb.insert(0, (char) i);
                    k[i] -= 2;
                }

            sb.insert(len, cc);
            out.print(sb.toString() + " ");
        }
    }

    class FastScanner {
        StringTokenizer st;
        BufferedReader br;

        FastScanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        boolean hasNext() throws IOException {
            return br.ready() || (st != null && st.hasMoreTokens());
        }

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

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

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

        String nextLine() throws IOException {
            return br.readLine();
        }

        boolean hasNextLine() throws IOException {
            return br.ready();
        }

    }

    private void run() throws IOException {
        in = new FastScanner(System.in); // in = new FastScanner(new FileInputStream(".in"));
        out = new PrintWriter(System.out); // out = new PrintWriter(new FileOutputStream(".out"));

        solve();

        out.flush();
        out.close();
    }

    public static void main(String[] args) throws IOException {
        new Main().run();
    }
}