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 MM = 1200000;
long long int m, n, k, p1, p2, p3, p, f, a[300];
string s;
int main() {
  cin >> n >> s;
  for (int i = 0; i < n; i++) a[s[i]]++;
  int ans = 0;
  multiset<char> x;
  x.clear();
  string s2;
  for (int i = 0; i < 300; i++) {
    ans += a[i] % 2;
    if (a[i] % 2 == 1) x.insert((char)i);
    a[i] /= 2;
    while (a[i]--) s2 += (char)(i);
  }
  if (x.size() == 0) {
    cout << 1 << endl;
    cout << s2;
    reverse(s2.begin(), s2.end());
    cout << s2;
  } else {
    while (!s2.empty() && s2.length() % x.size() != 0) {
      x.insert(s2.back());
      x.insert(s2.back());
      s2.pop_back();
    }
    p2 = s2.length() / x.size();
    string tem;
    cout << x.size() << endl;
    for (char c : x) {
      tem.clear();
      p3 = p2;
      while (p3--) {
        tem.push_back(s2.back());
        s2.pop_back();
      }
      cout << tem << c;
      reverse(tem.begin(), tem.end());
      cout << tem << " ";
    }
  }
  return 0;
}