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;
import java.util.StringTokenizer;


public class H_ {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner();
		PrintWriter pw = new PrintWriter(System.out);
		
		int n = sc.nextInt();
		char[] s = sc.next().toCharArray();
		int[] cnt = new int[128];
		for (int i = 0; i < n; i++)
			cnt[s[i]]++;
		
		int cntEven = 0;
		boolean allEven = true;
		for (int i = 0; i < cnt.length; i++) {
			if(cnt[i]%2 == 1)
			{
				allEven = false;
				break;
			}
		}
		
		
		ArrayList<Character> fill = new ArrayList<Character>();
		ArrayList<Character> pal = new ArrayList<Character>();
		for (int i = 0; i < 128; i++) {
			if(cnt[i] % 2 == 1)
			{
				pal.add((char)i);
				cnt[i]--;
			}
			cntEven += cnt[i];
			for (int j = 0; j < cnt[i]; j++) {
				fill.add((char)i);
			}
		}
		
		
		
		if(pal.size() == 0)
		{
			Collections.sort(fill);
			int ind = 0;
			pw.println(1);
			StringBuilder pre = new StringBuilder("");
			StringBuilder suf = new StringBuilder("");
			for (int i = 0; i < n/2; i++) {
				pre.append(fill.get(ind++));
				suf.append(fill.get(ind++));
			}
			pw.print(pre);
			pw.print(suf.reverse());
			pw.println();
			pw.flush();
			pw.close();
			return;
		}
		
		
		int pals = pal.size();
		int ans = 0;
		for (int l = 1; l <= n; l+=2) {
			int rem = cntEven - (l-1)*pals;
			if(rem < 0)
				continue;
			if(rem % l == 0)
				ans = l;
		}
		
		Collections.sort(fill);
		int ind = 0;
		int words = n/ans;
		int others = words - pal.size();
		for (int i = 0; i < others; i+=2) {
			pal.add(fill.get(ind++));
			pal.add(fill.get(ind++));
		}
		pw.println(words);
		for (int i = 0; i < pal.size(); i++) {
			StringBuilder pre = new StringBuilder();
			StringBuilder suf = new StringBuilder();
			for (int j = 0; j < (ans-1)/2; j++) {
				pre.append(fill.get(ind++));
				suf.append(fill.get(ind++));
			}
			
			pw.print(pre);
			pw.print(pal.get(i));
			pw.print(suf.reverse());
			if(i != pal.size()-1)
				pw.print(" ");
		}
		pw.println();
		pw.flush();
		pw.close();
	}
	
	static class Scanner
	{
		BufferedReader br; StringTokenizer st;
		public Scanner()
		{
			br = new BufferedReader(new InputStreamReader(System.in));
		}
		
		public String next() throws IOException
		{
			while(st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		public int nextInt() throws IOException
		{
			return Integer.parseInt(next());
		}
		
		public long nextLong() throws IOException
		{
			return Long.parseLong(next());
		}
		
	}
}