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

public class H {

	static int[] map;
	static ArrayList<Character> symbols;

	static void fillMap() {
		int ans = 0;
		map = new int[300];
		symbols = new ArrayList();
		for (char c = 'a'; c <= 'z'; c++) {
			map[c] = ans++;
			symbols.add(c);
		}
		for (char c = 'A'; c <= 'Z'; c++) {
			map[c] = ans++;
			symbols.add(c);

		}
		for (char c = '0'; c <= '9'; c++) {
			map[c] = ans++;
			symbols.add(c);
		}
	}

	static boolean ok(int[] cnt, int len, int n, int odd) {
		int numStrings = n / len;
		if (odd > numStrings)
			return false;
		boolean[] mid = new boolean[numStrings];
		int last = 0;
		for (char c : symbols)
			if (cnt[map[c]] % 2 == 1) {
				odd--;
				cnt[map[c]]--;
				mid[last++] = true;
			}
		return (numStrings - last) % 2 == 0;

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		char[] s = sc.next().toCharArray();
		PrintWriter out = new PrintWriter(System.out);
		int[] cnt = new int[26 + 26 + 10];
		fillMap();
		for (char c : s)
			cnt[map[c]]++;
		int odd = 0;
		for (int x : cnt)
			if (x % 2 == 1)
				odd++;
		if (odd <= 1) {
			char[] ans = new char[n];
			int l = 0, r = n - 1;
			for (char c : symbols) {
				while (cnt[map[c]] >= 2) {
					cnt[map[c]] -= 2;
					ans[l++] = c;
					ans[r--] = c;
				}
				if (cnt[map[c]] == 1)
					ans[n / 2] = c;
			}
			System.out.println(1);
			System.out.println(ans);
			return;
		}
		int lenAns = 1;
		for (int len = n; len > 0; len--)
			if (len % 2 == 1 && n % len == 0) {
				boolean ok = ok(cnt.clone(), len, n, odd);
				if (ok) {
					lenAns = len;
					break;
				}
			}
		out.println(n / lenAns);

		int numStrings = n / lenAns;
		char[][] ans = new char[numStrings][lenAns];
		int[] l = new int[numStrings];
		boolean[] mid = new boolean[numStrings];
		int last = 0;
		for (char c : symbols)
			if (cnt[map[c]] % 2 == 1) {
				odd--;
				cnt[map[c]]--;
				mid[last] = true;
				ans[last++][lenAns / 2] = c;
			}
		for (char c : symbols) {
			while (cnt[map[c]] > 0 && last < numStrings) {
				ans[last++][lenAns / 2] = c;
				ans[last++][lenAns / 2] = c;
				cnt[map[c]] -= 2;
			}
		}
	
		last = 0;
		for (char c : symbols) {
			while (cnt[map[c]] > 0) {
				if (l[last] == lenAns / 2)
					last++;
				else {
					ans[last][l[last]] = c;

					ans[last][lenAns - l[last] - 1] = c;
//					last++;
					cnt[map[c]] -= 2;
					l[last]++;
				}
			}
		}
		for (char[] x : ans) {
			out.print(x);
			out.print(" ");
		}
		out.println();
		out.close();
	}

	static class Scanner {
		BufferedReader br;
		StringTokenizer st;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(FileReader f) {
			br = new BufferedReader(f);
		}

		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());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public int[] nextIntArr(int n) throws IOException {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = Integer.parseInt(next());
			}
			return arr;
		}

	}
}