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;
const double eps = 1e-10;
const double pi = 3.1415926535897932384626433832795;
const double eln = 2.718281828459045235360287471352;
int convert(char s) {
  if (s <= '9') return s - 48;
  if (s <= 'Z') return s - 65 + 10;
  return s - 97 + 36;
}
char nconvert(int s) {
  if (s <= 9) return s + 48;
  if (s <= 35) return s - 10 + 65;
  return s + 97 - 36;
}
const int maxn = 400005;
char s[maxn], ans[maxn];
int cnt[105], sum[2], n;
vector<int> g, ji, ou;
int main() {
  scanf("%d", &n);
  scanf("%s", s);
  for (int i = 0; i < n; i++) cnt[convert(s[i])]++;
  for (int i = 0; i <= 62; i++) {
    if (!cnt[i]) continue;
    sum[cnt[i] & 1]++;
    if (cnt[i] & 1) {
      for (int j = 1; j <= cnt[i] - 1; j++) ou.push_back(i);
      ji.push_back(i);
    } else {
      for (int j = 1; j <= cnt[i]; j++) ou.push_back(i);
    }
  }
  if (sum[1] == 0) {
    printf("1\n");
    sort(s, s + n);
    int l = 0, r = n - 1;
    for (int i = 0; i < n; i += 2) {
      ans[l++] = s[i];
      ans[r--] = s[i + 1];
    }
    ans[n] = 0;
    printf("%s\n", ans);
    return 0;
  }
  for (int i = 1; i * i <= n; i++) {
    if (n % i != 0) continue;
    if ((n / i) & 1) g.push_back(i);
    if (i & 1) g.push_back(n / i);
  }
  sort(g.begin(), g.end());
  int now;
  for (int p : g) {
    if (p < sum[1]) continue;
    now = p;
    break;
  }
  int len = n / now;
  printf("%d\n", now);
  int cj = 0, co = 0, coo = (int)ou.size() - 1;
  while (now--) {
    int l = 0, r = len - 1;
    ans[len] = 0;
    for (int i = 0; i < ((len - 1) >> 1); i++) {
      ans[l++] = ans[r--] = nconvert(ou[co]);
      co += 2;
    }
    if (cj >= ji.size()) {
      ans[l] = nconvert(ou[coo--]);
    } else
      ans[l] = nconvert(ji[cj++]);
    printf("%s", ans);
    if (now > 0)
      printf(" ");
    else
      printf("\n");
  }
  return 0;
}