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;
bool check(long long odd, long long even, long long groups, long long n) {
  long long len = n / groups;
  if (len % 2 == 0) {
    if (odd > 0)
      return false;
    else
      return true;
  } else {
    if (even >= (len / 2) * groups)
      return true;
    else
      return false;
  }
}
void solve() {
  long long n;
  cin >> n;
  string s;
  cin >> s;
  vector<long long> v1(26, 0), v2(26, 0), v3(10, 0);
  for (long long i = 0; i < n; i++) {
    if (s[i] >= 'A' and s[i] <= 'Z')
      v1[s[i] - 'A']++;
    else if (s[i] >= 'a' and s[i] <= 'z')
      v2[s[i] - 'a']++;
    else if (s[i] >= '0' and s[i] <= '9')
      v3[s[i] - '0']++;
  }
  vector<char> oddV, evenV;
  for (long long i = 0; i < 26; i++) {
    for (long long j = 0; j < v1[i] / 2; j++) evenV.push_back(i + 'A');
    for (long long j = 0; j < v2[i] / 2; j++) evenV.push_back(i + 'a');
    if (v1[i] % 2 == 1) oddV.push_back(i + 'A');
    if (v2[i] % 2 == 1) oddV.push_back(i + 'a');
  }
  for (long long i = 0; i < 10; i++) {
    for (long long j = 0; j < v3[i] / 2; j++) evenV.push_back(i + '0');
    if (v3[i] % 2 == 1) oddV.push_back(i + '0');
  }
  long long odd = oddV.size(), even = evenV.size();
  long long maxi = 1;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i != 0) continue;
    if (check(odd, even, n / i, n)) maxi = max(i, maxi);
    if (check(odd, even, i, n)) maxi = max(n / i, maxi);
  }
  long long grps = n / maxi, len = maxi;
  long long oddIndex = 0, evenIndex = 0;
  long long evenLeft = even - (len / 2) * grps;
  cout << grps << endl;
  for (long long j = 0; j < evenLeft; j++) {
    oddV.push_back(evenV[even - 1 - j]);
    oddV.push_back(evenV[even - 1 - j]);
  }
  for (long long i = 0; i < grps; i++) {
    for (long long j = 0; j < len / 2; j++) cout << evenV[evenIndex + j];
    if (len % 2 == 1) {
      cout << oddV[oddIndex];
      oddIndex++;
    }
    for (long long j = len / 2 - 1; j >= 0; j--) cout << evenV[evenIndex + j];
    evenIndex += len / 2;
    cout << " ";
  }
  cout << endl;
}
int main() {
  long long t = 1;
  for (long long i = 1; i <= t; i++) solve();
}