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>
#pragma GCC optimize(3)
using namespace std;
bool Finish_read;
template <class T>
inline void read(T &x) {
  Finish_read = 0;
  x = 0;
  int f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    if (ch == EOF) return;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  x *= f;
  Finish_read = 1;
}
template <class T>
inline void print(T x) {
  if (x / 10 != 0) print(x / 10);
  putchar(x % 10 + '0');
}
template <class T>
inline void writeln(T x) {
  if (x < 0) putchar('-');
  x = abs(x);
  print(x);
  putchar('\n');
}
template <class T>
inline void write(T x) {
  if (x < 0) putchar('-');
  x = abs(x);
  print(x);
}
int n, tot, tmp, num[205], num2;
int cutk[1505];
char st[400005];
struct pa {
  char ch;
  int num;
} xx, rem[400005];
queue<pa> cnt1, cnt2;
inline void works(int len) {
  tmp = n / len;
  writeln(tmp);
  for (int k = 1; k <= tmp; k++) {
    int t = 0, tk = len / 2;
    while (tk) {
      xx = cnt2.front(), cnt2.pop();
      if (xx.num > tk) {
        xx.num -= tk;
        rem[++t].ch = xx.ch, rem[t].num = tk;
        tk = 0, cnt2.push(xx);
      } else {
        tk -= xx.num;
        rem[++t].ch = xx.ch, rem[t].num = xx.num;
      }
    }
    for (int i = 1; i <= t; i++)
      for (int j = 1; j <= rem[i].num; j++) putchar(rem[i].ch);
    if (len % 2) {
      if (!cnt1.empty())
        xx = cnt1.front(), cnt1.pop(), putchar(xx.ch);
      else {
        xx = cnt2.front(), cnt2.pop(), putchar(xx.ch), xx.num--;
        cnt1.push(xx);
        if (xx.num) cnt2.push(xx);
      }
    }
    for (int i = t; i >= 1; i--)
      for (int j = 1; j <= rem[i].num; j++) putchar(rem[i].ch);
    if (k != tmp) putchar(' ');
  }
}
int main() {
  read(n);
  scanf("%s", st);
  tmp = sqrt(n) + 1;
  for (int i = 1; i <= tmp; i++)
    if (n % i == 0) {
      cutk[++tot] = i;
      cutk[++tot] = n / i;
    }
  sort(cutk + 1, cutk + tot + 1);
  for (int i = 0; i < n; i++) num[(int)st[i]]++;
  for (int i = 0; i <= 150; i++)
    if (num[i]) {
      if (num[i] / 2) {
        xx.ch = i;
        xx.num = num[i] / 2;
        cnt2.push(xx);
        num2 += xx.num;
      }
      if (num[i] % 2) {
        xx.ch = i;
        xx.num = 1;
        cnt1.push(xx);
      }
    }
  for (int i = tot; i >= 1; i--)
    if ((cutk[i] / 2) * (n / cutk[i]) <= num2) {
      works(cutk[i]);
      break;
    }
  return 0;
}