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;
char f(int p) {
  if (p < 26)
    return p + 'a';
  else if (p < 52)
    return p - 26 + 'A';
  else
    return p - 52 + '0';
}
bool hlp(int x, vector<int> frq, int n) {
  int tmp = n / x;
  int p = (x / 2) * tmp, o = 0;
  if (x & 1) {
    o = tmp;
    for (int i = 0; i < 62; ++i) {
      if (p >= frq[i] / 2) {
        p -= frq[i] / 2;
        o -= frq[i] % 2;
      } else {
        frq[i] -= 2 * p;
        p = 0;
        o -= frq[i];
      }
    }
  } else
    for (int i = 0; i < 62; ++i) p -= frq[i] / 2;
  return (p <= 0 && o <= 0);
}
vector<vector<char>> form(int x, vector<int> frq, int n) {
  int tmp = n / x, p = 0;
  vector<vector<char>> v(tmp, vector<char>(x + 1));
  for (int i = 0; i < tmp; ++i) {
    int s = 1, e = x;
    while (s < e) {
      while (frq[p] < 2) ++p;
      v[i][s] = v[i][e] = f(p);
      frq[p] -= 2;
      ++s;
      --e;
    }
  }
  p = 0;
  if (x & 1) {
    for (int i = 0; i < tmp; ++i) {
      while (!frq[p]) ++p;
      v[i][x / 2 + 1] = f(p);
      --frq[p];
    }
  }
  return v;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, i, j;
  cin >> n;
  char c;
  vector<int> fac, alph(62);
  for (i = 1; i <= sqrt(n); ++i)
    if (n % i == 0) fac.push_back(i), fac.push_back(n / i);
  for (i = 0; i < n; ++i) {
    cin >> c;
    if (c <= 'z' && c >= 'a')
      ++alph[c - 'a'];
    else if (c <= 'Z' && c >= 'A')
      ++alph[c - 'A' + 26];
    else
      ++alph[c - '0' + 52];
  }
  sort(fac.begin(), fac.end(), greater<int>());
  for (i = 0; i < fac.size(); ++i)
    if (hlp(fac[i], alph, n)) break;
  vector<vector<char>> v = form(fac[i], alph, n);
  cout << n / fac[i] << '\n';
  for (i = 0; i < v.size(); ++i, cout << " ")
    for (j = 1; j < v[i].size(); ++j) cout << v[i][j];
}