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 INF = 1 << 30;
const long long inf = 1LL << 60;
const int N = 400010;
const int seed = 137;
const int weg = 998244353;
char s[N], ans[N];
int n;
int read() {
  int w(0), f(0);
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') f = 1, c = getchar();
  while (c >= '0' && c <= '9') w = w * 10 + c - '0', c = getchar();
  return f ? -w : w;
}
int sum[200], num, st[N];
bool check(int t) {
  if (n % t) return 0;
  if (!t) return 0;
  if (num && ((n / t) % 2 == 0)) return 0;
  int tmp = n / t;
  int t1, t2, tp;
  t1 = 0, t2 = 1;
  tp = tmp / 2;
  printf("%d\n", t);
  for (int i = 1; i <= t; ++i) {
    if (num) {
      if (t2 <= num) {
        ans[tp + 1] = st[t2], t2++;
      } else {
        while (!sum[t1]) t1++;
        sum[t1] -= 2, ans[tp + 1] = t1, st[++num] = t1;
      }
    }
    for (int j = 1; j <= tp; ++j) {
      while (sum[t1] < 2) t1++;
      ans[j] = ans[tmp - j + 1] = t1, sum[t1] -= 2;
    }
    for (int j = 1; j <= tmp; ++j) putchar(ans[j]);
    printf(" ");
  }
  return 1;
}
int main() {
  scanf("%d\n", &n);
  for (int i = 1; i <= n; ++i) s[i] = getchar(), sum[s[i]]++;
  for (int i = '0'; i <= 'z'; ++i)
    if (sum[i] & 1) st[++num] = i, sum[i]--;
  if (!num)
    check(1);
  else
    for (int i = num; i <= n; i += 2)
      if (check(i)) break;
  return 0;
}