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

/*
15
aaaaaaaaaaabbbc

 */
public class P883H
{
	static int pInd;
	static PrintWriter pw = new PrintWriter(System.out);
	public static void main(String[] args)
	{
		FastScanner scan = new FastScanner();
		int n = scan.nextInt();
		char[] s = scan.next().toCharArray();
		int[] cnt = new int[256];
		for (int i = 0; i < s.length; i++)
			cnt[s[i]]++;
		ArrayList<Character> pairs = new ArrayList<>();
		ArrayList<Character> single = new ArrayList<>();
		for (int i = 0; i < cnt.length; i++)
		{
			while (cnt[i] >= 2)
			{
				pairs.add((char)i);
				cnt[i] -= 2;
			}
			if (cnt[i] == 1)
				single.add((char)i);
		}
		int minGroups = Math.max(1, single.size());
		for (int i = minGroups; i <= n; i++)
		{
			if (n % i != 0)
				continue;
			int each = n/i;
			if (each % 2 == 0 && single.size() > 0)
				continue; 
			pw.println(i);
			if (each % 2 == 0)
			{
				print(each, pairs);
				break;
			}
			for (int j = 0; j < single.size(); j++)
			{
				char mid = single.get(j);
				print(each, mid, pairs);
			}
			while (pInd < pairs.size())
			{
				char mid = pairs.get(pInd++);
				print(each, mid, pairs);
				print(each, mid, pairs);
			}
			break;
		}
		pw.flush();
	}
	private static void print(int size, ArrayList<Character> pairs)
	{
		char[] str = new char[size];
		for (int i = 0; i < size/2; i++)
		{
			char outer = pairs.get(pInd++);
			str[size/2-1-i] = outer;
			str[size/2+i] = outer;
		}
		pw.print(new String(str));
	}
	private static void print(int size, char mid, ArrayList<Character> pairs)
	{
		char[] str = new char[size];
		str[size/2] = mid;
		for (int i = 1; i <= size/2; i++)
		{
			char outer = pairs.get(pInd++);
			str[size/2-i] = outer;
			str[size/2+i] = outer;
		}
		pw.print(new String(str) + " ");
	}
	
	static class FastScanner
	{
		BufferedReader br;
		StringTokenizer st;

		public FastScanner()
		{
			try
			{
				br = new BufferedReader(new InputStreamReader(System.in));
				st = new StringTokenizer(br.readLine());
			} catch (Exception e)
			{
				e.printStackTrace();
			}
		}

		public String next()
		{
			if (st.hasMoreTokens())
				return st.nextToken();
			try
			{
				st = new StringTokenizer(br.readLine());
			} catch (Exception e)
			{
				e.printStackTrace();
			}
			return st.nextToken();
		}

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

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

		public String nextLine()
		{
			String line = "";
			try
			{
				line = br.readLine();
			} catch (Exception e)
			{
				e.printStackTrace();
			}
			return line;
		}
	}
}