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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int M = 62;
char st[400010];
char mid[400010], ans[400010];
int g[1000], c[1000];
char ch[1000];
int main() {
  int n;
  scanf("%d", &n);
  scanf("%s", st);
  for (int i = 'a'; i <= 'z'; i++) g[i] = i - 'a', ch[i - 'a'] = i;
  for (int i = 'A'; i <= 'Z'; i++) g[i] = i - 'A' + 26, ch[i - 'A' + 26] = i;
  for (int i = '0'; i <= '9'; i++) g[i] = i - '0' + 52, ch[i - '0' + 52] = i;
  for (int i = 0; i < n; i++) c[g[st[i]]]++;
  int ord = 0;
  for (int i = 0; i < M; i++)
    if (c[i] & 1) ord++;
  if (!ord) {
    int len = 0;
    for (int i = 0; i < M; i++) {
      for (int j = c[i]; j; j -= 2) st[++len] = ch[i];
    }
    st[len + 1] = '\0';
    printf("1\n%s", st + 1);
    reverse(st + 1, st + len + 1);
    printf("%s\n", st + 1);
  } else {
    for (int i = ord; i <= n; i++)
      if (!(n % i) && ((n / i) & 1) && (i & 1) == (ord & 1)) {
        int k = 0;
        for (int j = 0; j < M; j++)
          if (c[j] & 1) c[j]--, mid[++k] = ch[j];
        for (int j = 0; j < M && k < i; j++) {
          while (c[j] && k < i) {
            c[j]--, mid[++k] = ch[j];
            c[j]--, mid[++k] = ch[j];
          }
        }
        k = 1;
        int L = n / i / 2, now = 0;
        printf("%d\n", i);
        for (int j = 1; j <= i; j++) {
          for (int k = 1; k <= L; k++) {
            while (!c[now]) now++;
            ans[k] = ch[now];
            c[now] -= 2;
          }
          ans[L + 1] = '\0';
          printf("%s", ans + 1);
          printf("%c", mid[j]);
          reverse(ans + 1, ans + L + 1);
          printf("%s", ans + 1);
          putchar(j == i ? '\n' : ' ');
        }
        break;
      }
  }
  return 0;
}