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 maxn = 1e5 + 9;
bitset<100> b[maxn];
struct node {
  char str[10];
  int val;
} arr[maxn];
string as[maxn * 5];
char str[maxn * 5];
int vis[300];
bool cheak(int k, int n) {
  int temp[300];
  for (int i = 0; i < 300; ++i) temp[i] = vis[i];
  int cntk = n / k;
  if (k % 2 == 0) {
    for (int i = 0; i < 300; ++i)
      if (temp[i] % 2 == 1) return 0;
    for (int i = 0; i < cntk; ++i) {
      string temp1(k, '0');
      as[i] = temp1;
      for (int j = 0; j < k / 2; ++j)
        for (int z = 0; z < 300; ++z)
          if (vis[z]) {
            vis[z] -= 2;
            as[i][j] = (char)z;
            as[i][k - j - 1] = (char)z;
            break;
          }
    }
    return 1;
  } else {
    int cnt = cntk;
    for (int i = 0; i < 300 && cnt; ++i)
      if (temp[i] % 2 == 1) temp[i]--, cnt--;
    int flag = 0;
    for (int i = 0; i < 300; ++i)
      if (temp[i] % 2 == 1) flag = 1;
    if (cnt % 2 == 1 || flag) return 0;
    for (int i = 0; i < cntk; ++i) {
      string temp1(k, '0');
      as[i] = temp1;
      for (int j = 0; j < k / 2; ++j)
        for (int z = 0; z < 300; ++z)
          if (vis[z] >= 2) {
            vis[z] -= 2;
            as[i][j] = (char)z;
            as[i][k - j - 1] = (char)z;
            break;
          }
    }
    for (int i = 0; i < cntk; ++i) {
      for (int j = 0; j < 300; ++j)
        if (vis[j]) {
          as[i][(int)k / 2] = (char)j;
          vis[j] -= 1;
          break;
        }
    }
    return 1;
  }
}
int main() {
  int n;
  scanf("%d", &n);
  scanf("%s", str);
  int len = strlen(str);
  for (int i = 0; i < len; ++i) vis[str[i]]++;
  int ans = 0;
  for (int i = 1; i <= n; ++i) {
    if (n % i == 0) {
      int k = n / i;
      if (cheak(k, n)) {
        ans = k;
        break;
      }
    }
  }
  cout << n / ans << endl;
  for (int i = 0; i < n / ans; ++i) cout << as[i] << " ";
  cout << endl;
  return 0;
}