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;
using LL = long long;
using PII = pair<int, int>;
int n;
char s[500010];
int cnt[128];
int sol1() {
  int odd = 0, even = 0;
  for (int i = 0; i < int(128); ++i) {
    odd += cnt[i] & 1;
    even += cnt[i] >> 1;
  }
  if (odd == 0) {
    even -= 1;
    odd += 2;
  }
  for (int i = odd; even >= 0; i += 2, even -= 1) {
    if (even % i == 0) {
      return i;
    }
  }
  return INT_MAX;
}
int sol2() {
  int t = 0;
  for (int i = 0; i < int(128); ++i) {
    t += cnt[i] >> 1;
  }
  for (int i = (1); i <= int(n); ++i) {
    if (t % i == 0) {
      return i;
    }
  }
  return INT_MAX;
}
void f(int o, int x) {
  int len = n / x;
  printf("%d\n", x);
  while (x--) {
    char cen = 0;
    if (o == 1) {
      for (int i = 0; i < int(128); ++i) {
        if (cnt[i] & 1) {
          cnt[i]--;
          cen = i;
          break;
        }
      }
      if (!cen) {
        for (int i = 0; i < int(128); ++i) {
          if (cnt[i]) {
            cnt[i]--;
            cen = i;
            break;
          }
        }
      }
    }
    int v[128] = {}, rem = len - o;
    for (int i = 0; i < int(128); ++i) {
      while (rem > 0 && cnt[i] > 1) {
        rem -= 2;
        cnt[i] -= 2;
        v[i]++;
      }
    }
    for (int i = 0; i < int(128); ++i)
      for (int j = 0; j < int(v[i]); ++j) putchar(i);
    if (cen) putchar(cen);
    for (int i = 127; i >= 0; --i)
      for (int j = 0; j < int(v[i]); ++j) putchar(i);
    putchar(x == 0 ? '\n' : ' ');
  }
}
int main() {
  scanf("%d%s", &n, s);
  for (int i = 0; i < int(n); ++i) cnt[s[i]]++;
  bool odd = false;
  for (int i = 0; i < int(128); ++i) {
    if (cnt[i] & 1) {
      odd = true;
    }
  }
  int t1 = sol1(), t2 = INT_MAX;
  sol1();
  if (!odd) t2 = sol2();
  if (t1 < t2)
    f(1, t1);
  else
    f(0, t2);
  return 0;
}