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.PriorityQueue;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.AbstractCollection;
import java.util.StringTokenizer;
import java.io.BufferedReader;
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;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskH solver = new TaskH();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskH {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int[] count = new int[200];
            int n = in.nextInt();
            String x = in.nextLine();
            for (int i = 0; i < n; i++) {
                int p = (int) x.charAt(i);
                count[p]++;
            }
            int pair = 0;
            int odd = 0;
            PriorityQueue<Character> arg = new PriorityQueue<>();
            PriorityQueue<Character> odds = new PriorityQueue<>();
            for (int i = 0; i < 200; i++) {
                if (count[i] != 0) {
                    if (count[i] % 2 != 0) {
                        odd++;
                        odds.add((char) i);
                    }
                    pair = pair + count[i] / 2;
                    for (int j = 0; j < count[i] / 2; j++) {
                        arg.add((char) i);
                    }
                }
            }
            if (pair != 0 && odd == 0) {
                out.println("1");
                StringBuilder front = new StringBuilder();
                while (!arg.isEmpty()) {
                    front.append(arg.poll());
                }
                out.println(front.toString() + front.reverse().toString());
                return;
            } else if (pair % odd == 0) {
                out.println(odd);
                int each = pair / odd;
                boolean first = true;
                for (int i = 0; i < odd; i++) {
                    StringBuilder front = new StringBuilder();
                    for (int j = 0; j < each; j++) {
                        front.append(arg.poll());
                    }
                    if (!first) out.print(" ");
                    first = false;
                    out.print(front.toString() + odds.poll() + front.reverse().toString());
                }
                out.println();
                return;
            }
            while (pair > 0) {
                pair = pair - 1;
                char ap = arg.poll();
                odd = odd + 2;
                odds.add(ap);
                odds.add(ap);
                if (pair % odd == 0) {
                    out.println(odd);
                    int each = pair / odd;
                    boolean first = true;
                    for (int i = 0; i < odd; i++) {
                        StringBuilder front = new StringBuilder();
                        for (int j = 0; j < each; j++) {
                            front.append(arg.poll());
                        }
                        if (!first) out.print(" ");
                        first = false;
                        out.print(front.toString() + odds.poll() + front.reverse().toString());
                    }
                    out.println();
                    return;
                }
            }
            out.println(n);
            boolean first = true;
            for (int i = 0; i < 200; i++) {
                if (count[i] != 0) {
                    int c = count[i];
                    char p = (char) i;
                    for (int j = 0; j < c; j++) {
                        if (!first) out.print(" ");
                        out.print(p);
                        first = false;
                    }
                }
            }
            out.println();
        }

    }

    static class InputReader {
        BufferedReader br;
        StringTokenizer st;

        public InputReader(InputStream a) {
            br = new BufferedReader(new InputStreamReader(a));
        }

        public String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (NullPointerException e) {
                    return null;
                }
            }
            return st.nextToken();
        }

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

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}