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.io.IOException;
import java.io.InputStreamReader;
import java.util.AbstractCollection;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.util.LinkedList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskH solver = new TaskH();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskH {
        private int num(char c) {
            if (c >= 'a' && c <= 'z') {
                return c - 'a';
            } else if (c >= 'A' && c <= 'Z') {
                return c - 'A' + 26;
            } else {
                return c - '0' + 52;
            }
        }

        private char rev(int n) {
            if (n < 26)
                return (char) (n + 'a');
            else if (n < 52)
                return (char) (n - 26 + 'A');
            else
                return (char) (n - 52 + '0');
        }

        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            int N = in.ni();
            int[] cnt = new int[100];
            String s = in.ns();
            for (int i = 0; i < N; i++) {
                cnt[num(s.charAt(i))]++;
            }

            LinkedList<Character> even = new LinkedList<>();
            LinkedList<Character> odd = new LinkedList<>();
            for (int i = 0; i < 100; i++) {
                if (cnt[i] == 0)
                    continue;
                if (cnt[i] % 2 == 1) {
                    odd.add(rev(i));
                }
                for (int j = 0; j < cnt[i] / 2; j++) {
                    even.add(rev(i));
                }
            }
            if (odd.size() <= 1) {
                out.println(1);
                StringBuilder pal = new StringBuilder();
                for (Character c : even) {
                    pal.append(c);
                }
                out.print(pal);
                if (!odd.isEmpty())
                    out.print(odd.pollFirst());
                out.print(pal.reverse());
                out.println();
            } else {
                for (int div = 1; div <= N; div++) {
                    if (N % div == 0 && (N / div) % 2 == 1) {
                        if (odd.size() > div || (div - odd.size()) % 2 == 1)
                            continue;
                        char[] center = new char[div];
                        for (int i = 0; i < div; i++) {
                            if (!odd.isEmpty()) {
                                center[i] = odd.pollFirst();
                            } else {
                                center[i] = center[i + 1] = even.pollFirst();
                                i++;
                            }
                        }
                        out.println(div);
                        int size = (N / div - 1) / 2;
                        for (int i = 0; i < div; i++) {
                            StringBuilder pal = new StringBuilder();
                            for (int j = 0; j < size; j++) {
                                pal.append(even.pollFirst());
                            }
                            out.print(pal);
                            out.print(center[i]);
                            out.print(pal.reverse());
                            out.print(' ');
                        }
                        return;
                    }
                }
            }
        }

    }

    static class FastScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public FastScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String ns() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int ni() {
            return Integer.parseInt(ns());
        }

    }
}