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 oo = (int)1e9;
const int mod = (int)1e9 + 7;
const double PI = acos(-1.0);
const int MAX = 400009;
int n;
char s[MAX], ans[MAX];
int occ[250];
int main(int argc, char* argv[]) {
  scanf("%d", &n);
  scanf("%s", s);
  for (int i = 0; i < n; i++) occ[s[i]]++;
  int odd = 0;
  vector<char> a;
  for (int i = 0; i < 130; i++) {
    odd += (occ[i] & 1);
    if (occ[i] & 1) {
      a.push_back(i);
      --occ[i];
    }
  }
  for (int i = 0; i < 130; i++)
    while (occ[i]--) a.push_back(i);
  reverse((a).begin(), (a).end());
  for (int i = 0; i < n; i++) ans[i] = '*';
  for (int d = 1; d <= n; d++)
    if (n % d == 0 && d >= odd && (!odd || ((n / d) % 2 == 1))) {
      int nbr = d, len = n / d;
      for (int i = 0; i < nbr && odd; i++) {
        ans[len * i + len / 2] = a.back();
        a.pop_back();
      }
      cout << nbr << endl;
      for (int i = 0; i < nbr; i++)
        for (int j = 0; j < len / 2; j++) {
          ans[len * i + j] = a.back();
          a.pop_back();
          ans[len * i + len - 1 - j] = a.back();
          a.pop_back();
        }
      for (int i = 0; i < nbr; i++) {
        if (i) cout << " ";
        for (int j = 0; j < len; j++) cout << ans[i * len + j];
      }
      cout << endl;
      return 0;
    }
  return 0;
}