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 = 1e6;
const int Z = CHAR_MAX;
int n, oc;
int f[Z], D[N];
char M[N], *mid = M;
void use(char* c) {
  f[*c] -= 2;
  while ((*c) < Z && f[*c] == 0) (*c)++;
}
void solve(int sz) {
  printf("%d\n", n / sz);
  static char S[N];
  char *s, c = 0;
  while (f[c] == 0) c++;
  for (int k = 0; k < n / sz; k++) {
    s = S;
    for (int i = 0; i < sz / 2; i++) {
      *s++ = c;
      putchar(c);
      use(&c);
    }
    if (sz & 1) {
      if (M < mid)
        putchar(*--mid);
      else {
        *mid++ = c;
        putchar(c);
        use(&c);
      }
    }
    while (S < s) putchar(*--s);
    putchar(' ');
  }
}
int main() {
  scanf(" %d", &n);
  for (int i = 0; i < n; i++) {
    char in;
    scanf(" %c", &in);
    f[in]++;
  }
  for (int i = 0; i < Z; i++) oc += (f[i] & 1);
  int* ds = D;
  for (int i = 1; i * i <= n; i++)
    if (n % i == 0) {
      *ds++ = i;
      *ds++ = n / i;
    }
  sort(D, ds);
  ds = unique(D, ds);
  for (int* d = D; d != ds; d++) {
    int k = *d;
    int s = n / k;
    if ((s & 1) == 0 && oc == 0) {
      solve(s);
      break;
    }
    if ((s & 1) && oc <= k && (k - oc) % 2 == 0) {
      for (char c = 0; c < Z; c++)
        if (f[c] & 1) f[*mid++ = c]--;
      solve(s);
      break;
    }
  }
  putchar('\n');
}