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.*;
import java.util.*;
import java.math.BigInteger;
import java.util.Map.Entry;

import static java.lang.Math.*;

public class Main extends PrintWriter {

    List<String> solve(final int n, final int m, final int k, int[] cnt) {
        int odd = 0;

        for (int c = 0; c < k; c++) {
            if (cnt[c] % 2 == 1) {
                ++odd;
            }
        }

        if (m % 2 == 0 && odd > 0) {
            return null;
        }

        if (m % 2 == 1 && odd > n) {
            return null;
        }

        List<String> ans = new ArrayList<>();

        char[] buffer = new char[m + 23];

        for (int i = 0; i < n; i++) {
            int l = buffer.length / 2;
            int r = l + 1;

            if (m % 2 == 0) {
                int size = 0;

                for (char c = 0; size < m && c < k; c++) {
                    while (size < m && cnt[c] >= 2) {
                        buffer[l--] = c;
                        buffer[r++] = c;
                        cnt[c] -= 2;
                        size += 2;
                    }
                }
            } else {

                int size = 0;

                for (char c = 0; size < 1 && c < k; c++) {
                    if (cnt[c] % 2 == 1) {
                        buffer[r++] = c;
                        cnt[c] -= 1;
                        size += 1;
                    }
                }

                for (char c = 0; size < 1 && c < k; c++) {
                    if (cnt[c] >= 1) {
                        buffer[r++] = c;
                        cnt[c] -= 1;
                        size += 1;
                    }
                }

                for (char c = 0; size < m && c < k; c++) {
                    while (size < m && cnt[c] >= 2) {
                        buffer[l--] = c;
                        buffer[r++] = c;
                        cnt[c] -= 2;
                        size += 2;
                    }
                }

            }

            ans.add(new String(buffer, l + 1, m));
        }

        return ans;
    }

    void run() {
        int n = nextInt();
        int k = 123;

        int[] cnt = new int[k];

        String w = next();

        for (int i = 0; i < n; i++) {
            ++cnt[w.codePointAt(i)];
        }

        for (int m = n; m >= 1; m--) {
            if (n % m == 0) {
                List<String> list = solve(n / m, m, k, cnt.clone());
                if (list != null) {
                    println(list.size());

                    for (String string : list) {
                        print(string);
                        print(' ');
                    }

                    break;
                }
            }

        }

    }

    public static boolean nextPermutation(int[] permutation) {
        int n = permutation.length, a = n - 2;
        while (0 <= a && permutation[a] >= permutation[a + 1]) {
            a--;
        }
        if (a == -1) {
            return false;
        }

        int b = n - 1;
        while (permutation[b] <= permutation[a]) {
            b--;
        }

        swap(permutation, a, b);
        for (int i = a + 1, j = n - 1; i < j; i++, j--) {
            swap(permutation, i, j);
        }
        return true;
    }

    public static void swap(int[] array, int i, int j) {
        if (i == j) {
            return;
        }
        array[i] ^= array[j];
        array[j] ^= array[i];
        array[i] ^= array[j];
    }

    int[][] nextMatrix(int n, int m) {
        int[][] matrix = new int[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                matrix[i][j] = nextInt();
        return matrix;
    }

    String next() {
        while (!tokenizer.hasMoreTokens())
            tokenizer = new StringTokenizer(nextLine());
        return tokenizer.nextToken();
    }

    boolean hasNext() {
        while (!tokenizer.hasMoreTokens()) {
            String line = nextLine();
            if (line == null) {
                return false;
            }
            tokenizer = new StringTokenizer(line);
        }
        return true;
    }

    int[] nextArray(int n) {
        int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = nextInt();
        }
        return array;
    }

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

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    String nextLine() {
        try {
            return reader.readLine();
        } catch (IOException err) {
            return null;
        }
    }

    public Main(OutputStream outputStream) {
        super(outputStream);
    }

    static BufferedReader reader;
    static StringTokenizer tokenizer = new StringTokenizer("");
    static Random rnd = new Random();

    public static void main(String[] args) throws IOException {
        reader = new BufferedReader(new InputStreamReader(System.in));
        Main solution = new Main(System.out);
        solution.run();
        solution.close();
        reader.close();
    }
}