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 int N = 400004, M = 144;
int n, d[1004], p = 0, c[M];
char s[N];
string t[N];
void solve(int len) {
  int x = n / len;
  int p = 0;
  for (int i = 1; i <= x; i++) {
    for (int j = 0; j < len / 2; j++) {
      for (; p < M && c[p] < 2; p++)
        ;
      c[p] -= 2;
      t[i] += p;
    }
  }
  if (len & 1) {
    p = 0;
    for (int i = 1; i <= x; i++) {
      for (; p < M && c[p] == 0; p++)
        ;
      --c[p];
      t[i] += p;
    }
  }
  for (int i = 1; i <= x; i++) {
    string u = t[i].substr(0, t[i].size() - (len & 1));
    reverse(u.begin(), u.end());
    t[i] += u;
  }
}
int main() {
  scanf("%d %s", &n, s + 1);
  for (int i = 1; i * i <= n; i++)
    if (n % i == 0) {
      d[p++] = i;
      if (i * i != n) d[p++] = n / i;
    }
  sort(d, d + p);
  for (int i = 1; i <= n; i++) ++c[s[i]];
  int len = 0, cnt = 0;
  for (int i = 0; i < M; i++)
    if (c[i] & 1) ++cnt;
  for (int i = p - 1; i >= 0; i--) {
    if (d[i] % 2 == 0 && cnt == 0 || d[i] % 2 == 1 && n / d[i] >= cnt) {
      len = d[i];
      break;
    }
  }
  solve(len);
  printf("%d\n", n / len);
  for (int i = 1; i <= n / len; i++) cout << t[i] << ' ';
}