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>
char s[800005], ans[800006], b[800005];
struct node {
  int n;
  char c;
} a[800005];
int tot, n;
int read() {
  int t = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while ('0' <= ch && ch <= '9') {
    t = t * 10 + ch - '0';
    ch = getchar();
  }
  return t * f;
}
int main() {
  int limitnum = 0, m = 0;
  n = read();
  scanf("%s", s + 1);
  std::sort(s + 1, s + 1 + n);
  s[0] = '&';
  for (int i = 1; i <= n; i++)
    if (s[i] != s[i - 1]) {
      a[++m].c = s[i];
      a[m].n = 1;
    } else
      a[m].n++;
  for (int i = 1; i <= m; i++)
    if (a[i].n % 2) limitnum++;
  if (limitnum == 0) {
    int num = 1;
    for (int i = 1; i <= n / 2; i++) ans[i] = ans[n - i + 1] = s[num], num += 2;
    printf("%d\n", 1);
    for (int i = 1; i <= n; i++) printf("%c", ans[i]);
    return 0;
  }
  for (int i = 1; i <= n; i++)
    if (i >= limitnum && n % i == 0 && (n / i) % 2 == 1 &&
        (i - limitnum) % 2 == 0) {
      tot = i;
      break;
    }
  int ss = 0;
  for (int i = 1; i <= m; i++)
    if (a[i].n % 2) {
      a[i].n--;
      b[++ss] = a[i].c;
    }
  int rou = 1;
  while (ss < tot) {
    while (a[rou].n && ss < tot) {
      b[++ss] = a[rou].c;
      b[++ss] = a[rou].c;
      a[rou].n -= 2;
    }
    if (!a[rou].n) rou++;
  }
  int k = 1;
  printf("%d\n", tot);
  for (int i = 1; i <= tot; i++) {
    for (int j = 1; j <= (n / tot) / 2; j++) {
      while (!a[k].n && k < m) k++;
      ans[j] = ans[(n / tot) - j + 1] = a[k].c, a[k].n -= 2;
    }
    ans[((n / tot) / 2) + 1] = b[i];
    for (int j = 1; j <= n / tot; j++) printf("%c", ans[j]);
    printf(" ");
  }
}