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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;

public class H {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String s = br.readLine();
		int[] occ = new int[256];
		for(int i = 0; i < s.length(); i++)
			occ[s.charAt(i)]++;
		int odd = 0;
		ArrayList<Integer> odds = new ArrayList<>();
		for(int i =0 ; i < 256; i++) {
			if(occ[i] % 2 == 1) {
				odd++;
				odds.add(i);
				occ[i]--;
			}
		}

		ArrayList<Integer> divs = new ArrayList<Integer>();
		for(int i = 1; (long) i * i <= n; i++) {
			if(n % i == 0) {
				divs.add(i);
				if(n / i != i)
					divs.add(n / i);
			}
		}

		Collections.sort(divs);
		int max = 0;
		for(int d: divs)
		{
			if(d % 2 == 0) {
				if(odd == 0)
					max = d;
				continue;
			}
			int nums = n / d;
			if(odd > nums)
				continue;
			if(nums % 2 == odd % 2)
				max = d;
		}

		int numS = n / max;
		PrintWriter out = new PrintWriter(System.out);
		out.println(numS);
		int oddi = 0;
		for(int i = 0; i < numS; i++) {
			char[] st = new char[max];
			if(oddi < odds.size())
				st[max / 2] = (char) odds.get(oddi++).intValue();
			else if(max % 2 == 1) {
				for(int k = 0; k < 256; k++)
					if(occ[k] > 0) {
						odds.add(k);
						occ[k]-=2;
						st[max / 2] = (char) k;
						break;
					}
			}

			for(int j = 0; j < max / 2; j++) {
				for(int k = 0; k < 256; k++) {
					if(occ[k] > 0) {
						st[j] = (char)(k);
						st[max - 1 - j] = (char)(k);
						occ[k] -= 2;
						break;
					}
				}

			}

			out.print(new String(st));
			if(i == numS - 1)
				out.println();
			else
				out.print(" ");
		}

		out.flush();
		out.close();
	}


}