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

public class ProblemH {

	public static void main(String[] args) {

		PalindromicCut PC = new PalindromicCut();
		PC.solve();
		PC.print();

	}

}

class PalindromicCut {

	Scanner sc;
	int n;
	String string;
	ArrayList<Integer> list;
	ArrayList<Integer> center;
	ArrayList<String> answer;

	PalindromicCut() {
		list = new ArrayList<>(62);
		for (int i = 0; i < 62; i++) {
			list.add(0);
		}
		sc = new Scanner(System.in);
		n = sc.nextInt();
		string = sc.next();
		for (int i = 0; i < n; i++) {
			char p = string.charAt(i);
			if (p >= 'A' && p <= 'Z')
				list.set((int) p - (int) 'A', list.get((int) p - (int) 'A') + 1);
			else if (p >= 'a' && p <= 'z')
				list.set((int) p - (int) 'a' + 26, list.get((int) p - (int) 'a' + 26) + 1);
			else
				list.set((int) p - (int) '0' + 52, list.get((int) p - (int) '0' + 52) + 1);
		}
		sc.close();

		center = new ArrayList<>();
	}

	void solve() {

		answer = new ArrayList<>();

		int odd = 0;
		for (int i = 0; i < 62; i++) {
			if (list.get(i) % 2 != 0) {
				odd++;
				center.add(i);
				list.set(i, list.get(i) - 1);
			}
		}

		if (odd == 0) {
			char[] word = new char[n];
			int i = 0;

			for (int k = 0; k < n / 2; k++) {
				while (i < 62 && list.get(i) == 0) {
					i++;
				}
				word[k] = fun(i);
				word[n - k - 1] = fun(i);
				list.set(i, list.get(i) - 2);
			}
			answer.add(String.valueOf(word));
			return;
		} // odd

		int idx = 0;

		while (!(n % odd == 0) || (n/odd) % 2 == 0) {
			while (idx < 62 && list.get(idx) == 0) {
				idx++;
			}
			list.set(idx, list.get(idx) - 2);
			center.add(idx);
			center.add(idx);
			odd = odd + 2;
		} // while

		int l = n / odd;
		char[] word = new char[l];

		int i = idx;
		for (int j = 0; j < odd; j++) {
			word[l / 2] = fun(center.get(j));

			for (int k = 0; k < l / 2; k++) {
				while (i < 62 && list.get(i) == 0) {
					i++;
				}
				word[k] = fun(i);
				word[l - k - 1] = fun(i);
				list.set(i, list.get(i) - 2);

			}
			answer.add(String.valueOf(word));
		}

	} // solve

	void print() {
		System.out.println(answer.size());
		for (String s : answer) {
			System.out.print(s + " ");
		}
	}

	char fun(int x) {
		char c;
		if (x < 26)
			c = (char) ((int) 'A' + x);
		else if (x < 52)
			c = (char) ((int) 'a' + x - 26);
		else
			c = (char) ((int) '0' + x - 52);

		return c;
	}
}