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>
int const INF = 1e9;
using namespace std;
const unsigned long long int mod = 1e9 + 9;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  n = s.size();
  map<char, int> mt;
  for (int i(0); i < n; i++) {
    mt[s[i]]++;
  }
  int nch(0);
  string tmp;
  vector<char> res;
  bool f1 = 0;
  for (auto it : mt) {
    for (int i(0); i < it.second / 2; i++) {
      tmp.push_back(it.first);
      f1 = 1;
    }
    if (it.second & 1) {
      res.push_back(it.first);
      nch++;
    }
  }
  if (f1 == 1 && nch == 0) {
    cout << "1\n";
    cout << tmp;
    for (int i(tmp.size() - 1); i >= 0; i--) printf("%c", tmp[i]);
    return 0;
  }
  while (n % nch != 0 || ((n - nch) / nch) % 2 != 0 || (n / nch) % 2 == 0) {
    if (tmp.size()) {
      res.push_back(tmp[tmp.size() - 1]);
      res.push_back(tmp[tmp.size() - 1]);
      nch += 2;
      tmp.pop_back();
    }
  }
  if (n % nch != 0 || ((n - nch) / nch) % 2 != 0 || (n / nch) % 2 == 0) {
    cout << s.size() << endl;
    for (auto it : s) cout << it << " ";
    return 0;
  }
  vector<string> ANS(nch);
  int len = n / nch;
  int index(0);
  for (int i(0); i < nch; i++) {
    string L;
    for (int j(0); j < len / 2; j++) L.push_back(tmp[index]), index++;
    ANS[i] = L;
    ANS[i].push_back(res[i]);
    for (int j(L.size() - 1); j >= 0; j--) ANS[i].push_back(L[j]);
  }
  bool check(0);
  for (int i(0); i < ANS.size(); i++) {
    if (ANS[i].size() != n / nch) {
      check = 1;
    }
  }
  if (check) {
    if (n % nch != 0 || ((n - nch) / nch) % 2 != 0 || (n / nch) % 2 == 0) {
      cout << s.size() << endl;
      for (auto it : s) cout << it << " ";
      return 0;
    }
  }
  printf("%d\n", ANS.size());
  for (int i(0); i < ANS.size(); i++) {
    cout << ANS[i];
    printf(" ");
  }
  return 0;
}