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;
int n, k, d[512], i, ans = 1;
vector<char> Ans[500000];
string s;
bool check(int n, int k) {
  int cnt1 = 0, cnt2 = 0, i, j;
  for (i = 0; i < 256; i++) {
    if (n % 2 == 0 && d[i] % 2 == 1) return 0;
    if (n % 2 == 1 && d[i] % 2 == 1) cnt1++;
    cnt2 += d[i] - d[i] % 2;
  }
  if (n % 2 == 0) return 1;
  if (cnt1 > k) return 0;
  if ((k - cnt1) % 2 == 0 && cnt2 >= k - cnt1) return 1;
  return 0;
}
void getAns1(int n, int k) {
  int SIZE = 0, i, j;
  for (i = 0; i < k; i++) Ans[i].clear();
  for (i = 0; i < 256; i++) {
    if (d[i] % 2 == 1) {
      d[i]--;
      Ans[SIZE++].push_back(char(i));
    }
  }
  if (SIZE != k) {
    for (i = 0; i < 256; i++) {
      while (d[i] % 2 == 0 && d[i] && SIZE != k) {
        d[i] -= 2;
        Ans[SIZE++].push_back(char(i));
        Ans[SIZE++].push_back(char(i));
      }
    }
  }
  SIZE--;
  for (i = 0; i < 256; i++) {
    while (d[i] && Ans[SIZE].size() != (n + 1) / 2) {
      d[i] -= 2;
      Ans[SIZE].push_back(char(i));
    }
    if (Ans[SIZE].size() == (n + 1) / 2) SIZE--, i--;
  }
  for (i = 0; i < k; i++) {
    for (j = Ans[i].size() - 1; j >= 0; j--) cout << Ans[i][j];
    for (j = 1; j < Ans[i].size(); j++) cout << Ans[i][j];
    cout << " ";
  }
}
void getAns2(int n, int k) {
  int SIZE = 0, i, j;
  for (i = 0; i < k; i++) Ans[i].clear();
  for (i = 0; i < 256; i++) {
    while (d[i] && Ans[SIZE].size() != n / 2) {
      Ans[SIZE].push_back(char(i));
      d[i] -= 2;
    }
    if (Ans[SIZE].size() == n / 2) SIZE++, i--;
  }
  for (i = 0; i < k; i++) {
    for (j = 0; j < Ans[i].size(); j++) cout << Ans[i][j];
    for (j = Ans[i].size() - 1; j >= 0; j--) cout << Ans[i][j];
    cout << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> s;
  for (i = 0; i < n; i++) {
    cin >> s[i];
    d[s[i]]++;
  }
  k = sqrt(n);
  for (i = 1; i <= k; i++) {
    if (n % i == 0) {
      if (check(n / i, i)) ans = max(ans, n / i);
      if (check(i, n / i)) ans = max(ans, i);
    }
  }
  cout << n / ans << endl;
  if (ans % 2 == 1)
    getAns1(ans, n / ans);
  else
    getAns2(ans, n / ans);
  return 0;
}