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 maxn = 4e5 + 10;
const long long mod = 1e9 + 7;
const int maxi = 2e6;
const long long inf = 1e18;
char a[maxn], s[maxn], b[maxn];
int cnt[100];
int main() {
  int n, len, i, k, l, r, h, j, len1;
  while (scanf("%d", &n) != EOF) {
    scanf("%s", a);
    len = strlen(a);
    memset(cnt, 0, sizeof(cnt));
    for (i = 0; i < len; i++) {
      if (a[i] >= 'a' && a[i] <= 'z')
        cnt[a[i] - 'a']++;
      else if (a[i] >= 'A' && a[i] <= 'Z')
        cnt[a[i] - 'A' + 26]++;
      else
        cnt[a[i] - '0' + 52]++;
    }
    k = 0;
    for (i = 0; i < 62; i++) {
      if (cnt[i] % 2) {
        if (i < 26) {
          cnt[i]--;
          b[++k] = 'a' + i;
        } else if (i >= 26 && i < 52) {
          cnt[i]--;
          b[++k] = 'A' + i - 26;
        } else {
          cnt[i]--;
          b[++k] = '0' + i - 52;
        }
      }
    }
    if (!k) {
      printf("1\n");
      l = 0;
      r = len - 1;
      while (l < r) {
        for (i = 0; i < 62; i++) {
          if (l > r) break;
          if (!cnt[i]) continue;
          if (i < 26) {
            s[l++] = 'a' + i;
            s[r--] = 'a' + i;
            cnt[i] -= 2;
          } else if (i >= 26 && i < 52) {
            s[l++] = 'A' + i - 26;
            s[r--] = 'A' + i - 26;
            cnt[i] -= 2;
          } else {
            s[l++] = '0' + i - 52;
            s[r--] = '0' + i - 52;
            cnt[i] -= 2;
          }
        }
      }
      for (i = 0; i < len; i++) printf("%c", s[i]);
      printf("\n");
      continue;
    }
    h = k;
    while (((n - h) % h) != 0 || (((n - h) / h) % 2)) {
      h += 2;
      if (h >= n) break;
    }
    while (k < h) {
      for (i = 0; i < 62; i++) {
        if (k >= h) break;
        if (!cnt[i]) continue;
        if (i < 26) {
          b[++k] = 'a' + i;
          b[++k] = 'a' + i;
          cnt[i] -= 2;
        } else if (i >= 26 && i < 52) {
          b[++k] = 'A' + i - 26;
          b[++k] = 'A' + i - 26;
          cnt[i] -= 2;
        } else {
          b[++k] = '0' + i - 52;
          b[++k] = '0' + i - 52;
          cnt[i] -= 2;
        }
      }
    }
    len1 = (n - h) / h;
    printf("%d\n", h);
    for (i = 1; i <= h; i++) {
      s[len1 / 2] = b[i];
      l = 0;
      r = len1;
      while (l != r) {
        for (k = 0; k < 62; k++) {
          if (l == r) break;
          if (!cnt[k]) continue;
          if (k < 26) {
            s[l++] = 'a' + k;
            s[r--] = 'a' + k;
            cnt[k] -= 2;
          } else if (k >= 26 && k < 52) {
            s[l++] = 'A' + k - 26;
            s[r--] = 'A' + k - 26;
            cnt[k] -= 2;
          } else {
            s[l++] = '0' + k - 52;
            s[r--] = '0' + k - 52;
            cnt[k] -= 2;
          }
        }
      }
      for (j = 0; j <= len1; j++) printf("%c", s[j]);
      if (i != h)
        printf(" ");
      else
        printf("\n");
    }
  }
  return 0;
}