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.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Writer;
import java.io.OutputStreamWriter;
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);
        OutputWriter out = new OutputWriter(outputStream);
        TaskH solver = new TaskH();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskH {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            in.readInt();
            String s = in.next();
            HashMap<Character, Integer> counts = new HashMap<>();
            for (char c : s.toCharArray()) counts.merge(c, 1, Integer::sum);
            // palandrome has at most one char with odd count
            // can have at most 192 divisors, so 192 lengths to consider
            for (int length = s.length(); length >= 1; length--) {
                if (s.length() % length == 0) {
                    if (length % 2 == 0) {
                        boolean works = true;
                        for (int val : counts.values()) if (val % 2 != 0) works = false;
                        if (works) {
                            char[][] res = worksEven(new HashMap<>(counts), length, s.length() / length);
                            out.printLine(s.length() / length);
                            for (char[] r : res) {
                                out.print(r);
                                out.print(" ");
                            }
                            return;
                        }
                    } else {
                        char[][] res = worksOdd(new HashMap<>(counts), length, s.length() / length);
                        if (res != null) {
                            out.printLine(s.length() / length);
                            for (char[] r : res) {
                                out.print(r);
                                out.print(" ");
                            }
                            return;
                        }
                    }
                }
            }
            throw new RuntimeException();
        }

        private char[][] worksEven(HashMap<Character, Integer> counts, int length, int numStr) { // length of each one
            char[][] res = new char[numStr][length];
            int row = 0, col = 0;
            for (char key : counts.keySet()) {
                int times = counts.get(key);
                outer:
                while (times >= 2) {
                    while (col >= length / 2) {
                        row++;
                        col = 0;
//                    out.printLine("HERE", key, row, numStr);
                        if (row >= numStr) {
                            break outer;
                        }
                    }
                    if (row >= numStr) {
                        break outer;
                    }
                    res[row][col] = res[row][length - col - 1] = key;
                    col++;
                    times -= 2;
                }
                counts.put(key, times);
            }
            return res;
        }

        private char[][] worksOdd(HashMap<Character, Integer> counts, int length, int numStr) { // length of each one
            int odds = 0;
            for (int val : counts.values()) if (val % 2 != 0) odds++;
            if (odds > numStr) return null;
            char[][] res = worksEven(counts, length, numStr);
            int row = 0;
            for (char key : counts.keySet()) {
                for (int iter = 0; iter < counts.get(key); iter++) {
                    while (res[row][length / 2] != 0) row++;
                    res[row++][length / 2] = key;
                }
            }
            if (row != numStr) {
                throw new RuntimeException(row + " " + numStr);
            }
            return res;
        }
    }
    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(char[] array) {
            writer.print(array);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void close() {
            writer.close();
        }

        public void printLine(int i) {
            writer.println(i);
        }
    }
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

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

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

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                if (Character.isValidCodePoint(c)) {
                    res.appendCodePoint(c);
                }
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
}