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.Map;
import java.util.Map.Entry;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author pandusonu
 */
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 n = in.readInt();
            String s = in.readString();
            HashMap<Integer, Integer> hash = new HashMap<>();
            for (char c : s.toCharArray()) {
                int x = (int) c;
                if (!hash.containsKey(x))
                    hash.put(x, 0);
                hash.put(x, hash.get(x) + 1);
            }
            int count = 0;
            int[][] a = new int[hash.size()][2];
            int tmp = 0;
            for (Map.Entry<Integer, Integer> entry : hash.entrySet()) {
                a[tmp][0] = entry.getKey();
                a[tmp][1] = entry.getValue();
                if (a[tmp][1] % 2 == 1)
                    count++;
                tmp++;
            }
            if (count == 0) {
                StringBuilder back = new StringBuilder("");
                out.println(1);
                for (int i = 0; i < hash.size(); i++) {
                    for (int j = 0; j < a[i][1] / 2; j++) {
                        out.print((char) a[i][0]);
                        back.append((char) a[i][0]);
                    }
                }
                out.print(back.reverse());
                return;
            }
            int ansSize = count;
            while (n%ansSize != 0 || (n/ansSize)%2==0) 
                ansSize +=2;
            if (ansSize == n || ansSize == -1) {
                out.println(n);
                for (int i = 0; i < n; i++) {
                    out.print(s.charAt(i) + " ");
                }
                return;
            }
            int size = n / ansSize;
            StringBuilder[][] ans = new StringBuilder[ansSize][2];
            for (int i = 0; i < ansSize; i++) {
                ans[i][0] = new StringBuilder("");
                ans[i][1] = new StringBuilder("");
            }
            outer:
            for (int i = 0; i < count; i++) {
                for (int j = 0; j < hash.size(); j++) {
                    if (a[j][1] % 2 == 1) {
                        ans[i][1].append((char) a[j][0]);
                        a[j][1]--;
                        continue outer;
                    }
                }
            }
            outer:
            for (int i = count; i < ansSize; i++) {
                for (int j = 0; j < hash.size(); j++) {
                    if (a[j][1] > 0) {
                        a[j][1]--;
                        ans[i][1].append((char) a[j][0]);
                        continue outer;
                    }
                }
            }
            outer:
            for (int i = 0; i < ansSize; i++) {
                int pos = ans[i][0].length() + ans[i][1].length();
                for (int j = 0; j < hash.size(); j++) {
                    if (pos == size) continue outer;
                    int added = 0;
                    for (int k = 0; k < a[j][1] / 2; k++) {
                        if (pos == size) break;
                        ans[i][0].append((char) a[j][0]);
                        ans[i][1].append((char) a[j][0]);
                        pos += 2;
                        added += 2;
                    }
                    a[j][1] -= added;
                    if (pos == size) continue outer;
                }
            }
            out.println(ansSize);
            for (int i = 0; i < ansSize; i++) {
                ans[i][0].reverse();
                out.print(ans[i][0] + "" + ans[i][1] + " ");
            }
        }

    }

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

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

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

        public int readInt() {
            return (int) readLong();
        }

        public long readLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
                if (c == -1) throw new RuntimeException();
            }
            boolean negative = false;
            if (c == '-') {
                negative = true;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') throw new InputMismatchException();
                res *= 10;
                res += (c - '0');
                c = read();
            } while (!isSpaceChar(c));
            return negative ? (-res) : (res);
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.append((char) c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

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

    }
}