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;
long long n, d;
string s;
char a[250005];
vector<char> o, j;
map<char, int> dd;
int main() {
  cin >> n >> s;
  s = " " + s;
  for (int i = 1; i <= n; i++) {
    dd[s[i]]++;
    if (dd[s[i]] == 1) a[++d] = s[i];
  }
  for (int i = 1; i <= d; i++) {
    int l = dd[a[i]];
    if (l % 2) j.push_back(a[i]);
    while (l / 2) {
      o.push_back(a[i]);
      l -= 2;
    }
  }
  int o1 = o.size(), j1 = j.size();
  if (!j1) j1 = 1;
  while (true) {
    if (o1 % j1 == 0) {
      cout << j1 << endl;
      break;
    }
    o1--;
    j1 += 2;
    char c = o.back();
    o.pop_back();
    for (int i = 1; i <= 2; i++) j.push_back(c);
  }
  int lo = j1;
  while (lo--) {
    vector<char> bk;
    for (int i = 1; i <= o1 / j1; i++) {
      cout << o.back();
      bk.push_back(o.back());
      o.pop_back();
    }
    if (!j.empty()) {
      cout << j.back();
      j.pop_back();
    }
    for (int i = 1; i <= o1 / j1; i++) {
      cout << bk.back();
      bk.pop_back();
    }
    cout << ' ';
  }
}