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;
int n, tot, tmp, num[205], num2;
int cutk[1505];
char st[400005];
struct pa {
  char ch;
  int num;
} xx, rem[400005];
queue<pa> dl1, dl2;
void works(int len) {
  tmp = n / len;
  printf("%d\n", tmp);
  for (int k = 1; k <= tmp; k++) {
    int t = 0, tk = len / 2;
    while (tk) {
      xx = dl2.front(), dl2.pop();
      if (xx.num > tk) {
        xx.num -= tk;
        rem[++t].ch = xx.ch, rem[t].num = tk;
        tk = 0, dl2.push(xx);
      } else {
        tk -= xx.num;
        rem[++t].ch = xx.ch, rem[t].num = xx.num;
      }
    }
    for (int i = 1; i <= t; i++)
      for (int j = 1; j <= rem[i].num; j++) putchar(rem[i].ch);
    if (len % 2) {
      if (!dl1.empty())
        xx = dl1.front(), dl1.pop(), putchar(xx.ch);
      else {
        xx = dl2.front(), dl2.pop(), putchar(xx.ch), xx.num--;
        dl1.push(xx);
        if (xx.num) dl2.push(xx);
      }
    }
    for (int i = t; i >= 1; i--)
      for (int j = 1; j <= rem[i].num; j++) putchar(rem[i].ch);
    if (k != tmp) printf(" ");
  }
}
int main() {
  scanf("%d", &n);
  scanf("%s", st);
  tmp = sqrt(n) + 1;
  for (int i = 1; i <= tmp; i++)
    if (n % i == 0) cutk[++tot] = i, cutk[++tot] = n / i;
  sort(cutk + 1, cutk + tot + 1);
  for (int i = 0; i < n; i++) num[(int)st[i]]++;
  for (int i = 0; i <= 200; i++)
    if (num[i]) {
      if (num[i] / 2)
        xx.ch = i, xx.num = num[i] / 2, dl2.push(xx), num2 += xx.num;
      if (num[i] % 2) xx.ch = i, xx.num = 1, dl1.push(xx);
    }
  for (int i = tot; i >= 1; i--)
    if ((cutk[i] / 2) * (n / cutk[i]) <= num2) {
      works(cutk[i]);
      return 0;
    }
}