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 = 4e5 + 20;
char str[maxn];
map<char, int> dp;
list<pair<char, int> > Q1, Q2;
int main(void) {
  int n;
  cin >> n;
  scanf("%s", str);
  for (int i = 0; i < n; i++) dp[str[i]]++;
  int cnt = 0;
  for (auto p : dp) {
    if (p.second & 1) {
      cnt++;
      Q1.push_front(pair<char, int>(p.first, 1));
      if (p.second > 1) Q2.push_front(pair<char, int>(p.first, p.second - 1));
    } else
      Q2.push_front(p);
  }
  if (cnt == 0) {
    cout << 1 << endl;
    int pos = 0;
    for (auto p : dp) {
      while (1) {
        str[pos] = str[n - pos - 1] = p.first;
        pos++;
        p.second -= 2;
        if (p.second <= 0) break;
      }
    }
    puts(str);
    return 0;
  }
  while (n % cnt != 0 || !((n / cnt) & 1)) {
    cnt += 2;
  }
  cout << cnt << endl;
  if (Q1.size() < cnt) {
    while (Q1.size() < cnt) {
      Q1.push_back(pair<char, int>(Q2.front().first, 1));
      Q1.push_back(pair<char, int>(Q2.front().first, 1));
      Q2.front().second -= 2;
      if (Q2.front().second <= 0) Q2.pop_front();
    }
  }
  int gap = n / cnt, pos = 0;
  while (cnt--) {
    for (int i = 0; i <= gap; i++) str[i] = 0;
    str[gap / 2] = Q1.front().first;
    Q1.front().second--;
    Q1.pop_front();
    for (int i = 0; i < gap; i++) {
      if (str[i]) break;
      str[i] = str[gap - i - 1] = Q2.front().first;
      Q2.front().second -= 2;
      if (Q2.front().second <= 0) Q2.pop_front();
    }
    for (int i = 0; i < gap; i++) putchar(str[i]);
    putchar(' ');
  }
  return 0;
}