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;
map<char, long long> mp;
signed main() {
  ios_base::sync_with_stdio(false);
  long long n;
  cin >> n;
  string s;
  cin >> s;
  for (long long i = 0; i < n; i++) mp[s[i]]++;
  string str;
  for (auto it = mp.begin(); it != mp.end(); it++) {
    if (it->second & 1) {
      str.push_back(it->first);
      it->second--;
    }
  }
  if (str.size() == 0) {
    cout << 1 << endl;
    string cp;
    sort((s).begin(), (s).end());
    for (long long i = 0; i < n; i += 2) cp.push_back(s[i]);
    s = cp;
    reverse((cp).begin(), (cp).end());
    s += cp;
    cout << s;
    return 0;
  }
  long long p = n - str.size(), q = str.size(), sen = 0;
  while ((p / 2 - sen) % (2 * sen + q)) {
    sen += 1;
  }
  sen = sen * 2;
  for (auto it = mp.begin(); it != mp.end(); it++) {
    if (sen == 0) break;
    if (it->second >= sen) {
      for (long long i = 0; i < sen; i++) str.push_back(it->first);
      it->second -= sen;
      sen = 0;
    } else {
      for (long long i = 0; i < it->second; i++) str.push_back(it->first);
      sen -= it->second;
      it->second = 0;
    }
  }
  string out;
  for (auto it = mp.begin(); it != mp.end(); it++) {
    for (long long j = 0; j < it->second; j++) out.push_back(it->first);
  }
  sort((out).begin(), (out).end());
  string outc;
  for (long long i = 1; i < out.size(); i += 2) outc.push_back(out[i]);
  out = outc;
  long long in = 0;
  string ans[str.size()];
  long long cur = out.size() / str.size();
  for (long long i = 0; i < str.size(); i++) {
    string tst = out.substr(in, cur);
    ans[i] = tst;
    in += cur;
  }
  cout << str.size() << endl;
  for (long long i = 0; i < str.size(); i++) ans[i].push_back(str[i]);
  for (long long i = 0; i < str.size(); i++) {
    string sss = ans[i].substr(0, ans[i].size() - 1);
    reverse((sss).begin(), (sss).end());
    ans[i] += sss;
  }
  for (long long i = 0; i < str.size(); i++) cout << ans[i] << " ";
}