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;
inline int read() {
  int res = 0;
  int neg;
  while (true) {
    char ch = getchar();
    if (ch >= '0' && ch <= '9' || ch == '-') {
      if (ch == '-')
        neg = -1;
      else
        neg = 1, res = ch - '0';
      break;
    }
  }
  while (true) {
    char ch = getchar();
    if (ch >= '0' && ch <= '9')
      res *= 10, res += ch - '0';
    else
      break;
  }
  return res * neg;
}
const int maxn = 400020;
const int maxm = 1000020;
const int MOd = 1e9 + 7;
int H[maxn], a;
vector<int> odd, even;
vector<int> w[maxn];
char ar[maxn];
int main() {
  scanf("%d", &a);
  scanf(" %s", ar);
  for (int i = 0; i < a; i++) H[ar[i]]++;
  for (int i = 0; i < 150; i++)
    if (H[i] & 1) odd.push_back(i), H[i]--;
  for (int i = 0; i < 150; i++)
    while (H[i] > 0) even.push_back(i), H[i] -= 2;
  int s = a;
  if (!odd.size()) {
    printf("1\n");
    for (int i = 0; i < even.size(); i++) printf("%c", even[i]);
    for (int i = even.size() - 1; i >= 0; i--) printf("%c", even[i]);
    printf("\n");
    return 0;
  }
  for (int i = odd.size(); i <= a; i += 2)
    if (a % i == 0 && ((a / i) & 1)) {
      s = i;
      break;
    }
  while (odd.size() < s) {
    int h = even[even.size() - 1];
    even.pop_back();
    odd.push_back(h);
    odd.push_back(h);
  }
  int sz = a / s;
  sz /= 2;
  for (int i = 0; i < s; i++) w[i].push_back(odd[i]);
  for (int i = 0; i < s; i++)
    for (int j = 0; j < sz; j++)
      w[i].push_back(even[even.size() - 1]), even.pop_back();
  printf("%d\n", s);
  for (int i = 0; i < s; i++) {
    for (int j = w[i].size() - 1; j >= 0; j--) printf("%c", w[i][j]);
    for (int j = 1; j < w[i].size(); j++) printf("%c", w[i][j]);
    printf(" ");
  }
  printf("\n");
  return 0;
}