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;
char a[4 * 100010];
char ans[4 * 100010];
int buck[256];
int odd_buck[256] = {0};
int main() {
  int n;
  scanf("%d\n", &n);
  gets(a);
  for (int i = 0; i <= n - 1; ++i) {
    ++buck[a[i]];
  }
  vector<char> vo;
  vector<char> ve;
  int odd_sum = 0, even_sum = 0;
  for (int i = '0'; i <= 'z'; ++i) {
    if (buck[i]) {
      if (buck[i] % 2) {
        --buck[i];
        ++odd_sum;
        ++odd_buck[i];
      }
      if (buck[i]) {
        even_sum += buck[i];
      }
    }
  }
  if (odd_sum == 0) {
    printf("1\n");
    int pos = '0';
    for (int i = 0; i < n / 2; ++i) {
      if (buck[pos] == 0)
        while (buck[pos] <= 0) ++pos;
      ans[i] = ans[n - i - 1] = (char)pos;
      buck[pos] -= 2;
    }
    ans[n] = '\0';
    printf("%s\n", ans);
    return 0;
  }
  int ext_odd = 0;
  while ((even_sum / 2) % odd_sum) {
    even_sum -= 2;
    odd_sum += 2;
    ext_odd += 2;
  }
  while (ext_odd > 0) {
    int pos = '0';
    while (buck[pos] <= 0) ++pos;
    buck[pos] -= 2;
    odd_buck[pos] += 2;
    ext_odd -= 2;
  }
  int b2[256], ob2[256];
  for (int i = '0'; i <= 'z'; ++i) {
    b2[i] = buck[i];
    ob2[i] = odd_buck[i];
  }
  for (int i = '0'; i <= 'z'; ++i) {
    while (b2[i]) {
      ve.push_back(i);
      b2[i] -= 2;
    }
    while (ob2[i]) {
      vo.push_back(i);
      ob2[i]--;
    }
  }
  int len = n / vo.size();
  printf("%d\n", vo.size());
  int j = 0;
  for (auto &odd : vo) {
    for (int i = 0; i < len / 2; ++i) {
      ans[i] = ans[len - i - 1] = ve[j++];
    }
    ans[len / 2] = odd;
    ans[len] = '\0';
    printf("%s ", ans);
  }
  printf("\n");
  return 0;
}