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.lang.*;
import java.io.*;
import java.util.*;
import java.math.*;
import java.net.*;

import static java.lang.Math.*;

public class Solution implements Runnable {
    
    int getInd(char c) {
        if ('0' <= c && c <= '9')
            return c - '0';
        if ('A' <= c && c <= 'Z')
            return c - 'A' + 10;
        return c - 'a' + 36;
    }
    
    char getChar(int ind) {
        if (ind < 10) {
            return (char)('0' + ind);
        } else if (ind < 36) {
            return (char)('A' + ind - 10);
        } else {
            return (char)('a' + ind - 36);
        }
    }
    
    void solve() throws Exception {
        int n = sc.nextInt();
        String s = sc.nextToken();
        int[] c = new int[100];
        for (int i = 0; i < n; i++) {
            c[getInd(s.charAt(i))]++;
        }
        int kOdd = 0;
        for (int i = 0; i < 100; i++) {
            kOdd += (c[i] & 1);
        }
        int len = n;
        while (len > 1) {
            if (n % len == 0) {
                int m = n / len;
                if (len % 2 == 0) {
                    if (kOdd == 0) {
                        break;
                    }
                } else {
                    if (kOdd <= m && (m - kOdd) % 2 == 0) {
                        break;
                    }
                }
            }
            --len;
        }
        int m = (n / len);
        out.println(m);
        char[] res = new char[len];
        for (int i = 0; i < m; i++) {
            if (i > 0) {
                out.print(" ");
            }
            int l = 0;
            for (int j = 0; j < 100 && 2 * l < len - 1; j++) {
                while (c[j] > 1 && 2 * l < len - 1) {
                    res[l] = res[len - 1 - l] = getChar(j);
                    c[j] -= 2;
                    l++;
                }
            }
            if ((len & 1) == 1) {
                boolean found = false;
                for (int j = 0; j < 100; j++) {
                    if ((c[j] & 1) == 1) {
                        res[l] = getChar(j);
                        c[j]--;
                        found = true;
                        break;
                    }
                }
                if (!found) {
                    for (int j = 0; j < 100; j++) {
                        if (c[j] > 0) {
                            res[l] = getChar(j);
                            c[j]--;
                            break;
                        }
                    }
                }
            }
            out.print(res);
        }
        out.println();
    }

    BufferedReader in;
    PrintWriter out;
    FastScanner sc;

    final String INPUT_FILE = "";
    final String OUTPUT_FILE = "";

    static Throwable throwable;

    public static void main(String[] args) throws Throwable {
        Thread thread = new Thread(null, new Solution(), "", (1 << 26));
        thread.start();
        thread.join();
        thread.run();
        if (Solution.throwable != null)
            throw Solution.throwable;
    }

    public void run() {
        try {
            if (INPUT_FILE.equals("")) {
                in = new BufferedReader(new InputStreamReader(System.in));
            } else {
                in = new BufferedReader(new FileReader(INPUT_FILE));
            }
            if (OUTPUT_FILE.equals("")) {
                out = new PrintWriter(System.out);
            } else {
                out = new PrintWriter(OUTPUT_FILE);
            }
            sc = new FastScanner(in);
            solve();
        } catch (Exception e) {
            throwable = e;
        } finally {
            out.close();
        }
    }

}

class FastScanner {
	
    BufferedReader reader;
    StringTokenizer strTok;

    FastScanner(BufferedReader reader) {
        this.reader = reader;
    }

    public String nextToken() throws Exception {
        while (strTok == null || !strTok.hasMoreTokens()) {
            strTok = new StringTokenizer(reader.readLine());
        }
        return strTok.nextToken();
    }

    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }
}