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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aman Kumar Singh
 */
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);
        HPalindromicCut solver = new HPalindromicCut();
        solver.solve(1, in, out);
        out.close();
    }

    static class HPalindromicCut {
        PrintWriter out;
        InputReader in;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.out = out;
            this.in = in;
            int n = ni();
            String st = n();
            int i = 0;
            int[] freq = new int[256];
            int last = 0;
            ArrayList<Integer> ar = new ArrayList<>();
            int cnt_odd = 0;
            int mn = n + 5;
            for (i = 0; i < n; i++)
                freq[(int) st.charAt(i)]++;
            for (i = 0; i < 256; i++)
                cnt_odd += freq[i] % 2;
            for (i = 1; i <= (int) Math.sqrt(n); i++) {
                if (n % i == 0) {
                    int x = i;
                    int y = n / i;
                    if (cnt_odd > 0) {
                        if (x % 2 != 0 && y >= cnt_odd && (y - cnt_odd) % 2 == 0)
                            mn = Math.min(mn, y);
                        if (y % 2 != 0 && x >= cnt_odd && (x - cnt_odd) % 2 == 0)
                            mn = Math.min(mn, x);
                    } else {
                        mn = Math.min(x, mn);
                        mn = Math.min(y, mn);
                    }
                }
            }
            int len = n / mn;
            int[] hola = new int[n];
            if (cnt_odd > 0) {
                int lol = len / 2;
                for (i = 0; i < 256; i++) {
                    if (freq[i] % 2 != 0) {
                        ar.add(i);
                        freq[i]--;
                    }
                }
                for (int x : ar) {
                    hola[lol] = x;
                    lol += len;
                }
                ar.clear();
                for (i = 0; i < 256; i++) {
                    if (freq[i] % 2 == 0 && freq[i] > 0)
                        ar.add(i);
                }
                int x = 0;
                while (lol < n) {
                    if (freq[ar.get(x)] == 0) {
                        x++;
                        continue;
                    }
                    hola[lol] = ar.get(x);
                    lol += len;
                    freq[ar.get(x)]--;
                }
                ar.clear();
                for (i = 0; i < 256; i++) {
                    if (freq[i] > 0)
                        ar.add(i);
                }
                x = 0;
                for (i = 0; i < mn; i++) {
                    int lo = i * len, hi = len * (i + 1) - 1;
                    for (int j = 0; j < (len - 1) / 2; j++) {
                        if (freq[ar.get(x)] == 0)
                            x++;
                        hola[lo++] = ar.get(x);
                        hola[hi--] = ar.get(x);
                        freq[ar.get(x)] -= 2;
                    }
                }
            } else {
                int x = 0;
                ar.clear();
                for (i = 0; i < 256; i++) {
                    if (freq[i] > 0)
                        ar.add(i);
                }
                //pn(ar);
                x = 0;
                for (i = 0; i < mn; i++) {
                    int lo = i * len, hi = len * (i + 1) - 1;
                    for (int j = 0; j < len / 2; j++) {
                        if (freq[ar.get(x)] == 0)
                            x++;
                        hola[lo++] = ar.get(x);
                        hola[hi--] = ar.get(x);
                        freq[ar.get(x)] -= 2;
                    }
                }
            }
            pn(mn);
            for (i = 0; i < n; i++) {
                if (i % len == 0 && i != 0)
                    p(" ");
                p((char) hola[i]);
            }
        }

        String n() {
            return in.next();
        }

        int ni() {
            return in.nextInt();
        }

        void pn(long zx) {
            out.println(zx);
        }

        void p(Object o) {
            out.print(o);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new UnknownError();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

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

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}