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;
int n;
char s[500005], ans[500005];
int cnt[105];
char id(int x) {
  if (x < 26) return 'a' + x;
  if (x < 52) return 'A' + x - 26;
  return '0' + x - 52;
}
int main() {
  int l, r;
  scanf("%d", &n);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; ++i) {
    if (s[i] >= 'a' && s[i] <= 'z') cnt[s[i] - 'a']++;
    if (s[i] >= 'A' && s[i] <= 'Z') cnt[s[i] - 'A' + 26]++;
    if (s[i] >= '0' && s[i] <= '9') cnt[s[i] - '0' + 52]++;
  }
  int num = 0;
  for (int i = 0; i < 62; ++i)
    if (cnt[i] % 2 == 1) num++;
  if (num == 0) {
    l = 1;
    r = n;
    for (int i = 0; i < 62; ++i)
      for (int j = 1; j <= cnt[i] / 2; ++j) ans[l++] = ans[r--] = id(i);
    cout << "1" << endl;
    for (int i = 1; i <= n; ++i) cout << ans[i];
    cout << endl;
    return 0;
  }
  for (int i = n; i >= 1; --i) {
    if (n % i != 0) continue;
    int tmp = n / i;
    if (i % 2 == 0) continue;
    if (tmp < num) continue;
    if ((tmp - num) % 2 == 1) continue;
    printf("%d\n", tmp);
    for (int t = 1; t <= tmp; ++t) {
      int dq = -1, dq2;
      for (int j = 0; j < 62; ++j) {
        if (cnt[j] % 2 == 1) dq = j;
        if (cnt[j] > 0) dq2 = j;
      }
      if (dq == -1) dq = dq2;
      ans[(i + 1) / 2] = id(dq);
      cnt[dq]--;
      l = 1;
      r = i;
      while (l < r) {
        for (int j = 0; j < 62; ++j) {
          if (cnt[j] < 2) continue;
          ans[l++] = ans[r--] = id(j);
          cnt[j] -= 2;
          break;
        }
      }
      for (int j = 1; j <= i; ++j) cout << ans[j];
      cout << " ";
    }
    cout << endl;
    break;
  }
  return 0;
}