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;
void solve(vector<int>& a, vector<string>& s, int r) {
  int n = s.size();
  int e = r / n;
  for (int i = 0; i < n; i++) {
    string tmp = s[i];
    s[i].clear();
    vector<int> nu(75, 0);
    int cur = 0;
    for (int j = 0; j < 75; j++) {
      nu[j] = min(a[j] / 2, (e - (int)tmp.length()) / 2 - cur);
      cur += nu[j];
      a[j] -= nu[j] * 2;
    }
    for (int j = 0; j < 75; j++)
      for (int k = 0; k < nu[j]; k++) s[i] += char((j + '0'));
    s[i] += tmp;
    for (int j = 74; j >= 0; j--)
      for (int k = 0; k < nu[j]; k++) s[i] += char((j + '0'));
  }
}
int main() {
  int n;
  string s;
  cin >> n >> s;
  vector<int> a(75, 0);
  for (int i = 0; i < n; i++) a[(s[i] - '0')]++;
  int l = 0, r = 0;
  for (int i = 0; i < 75; i++) l += (a[i] % 2) ? 1 : 0, r += a[i];
  vector<string> ans;
  if (l == 0) {
    ans.push_back("");
    solve(a, ans, r);
  } else {
    for (int i = 0; i < 75; i++) {
      if (a[i] % 2) {
        string tmp = "";
        tmp += char((i + '0'));
        ans.push_back(tmp);
        a[i]--;
      }
    }
    int mins = l;
    for (; mins <= r; mins += 2) {
      if (((r - mins) / 2) % mins == 0) break;
    }
    for (int i = 0; i < 75; i++)
      while (a[i] && l != mins) {
        l++, a[i]--;
        string tmp = "";
        tmp += char((i + '0'));
        ans.push_back(tmp);
      }
    solve(a, ans, r);
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}