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;
int num = 0;
int cnt[1000] = {0};
int candidate[400005] = {0};
string s;
bool check(int added) {
  if (added % 2) return false;
  if (n % (added + num)) return false;
  if ((n / (added + num)) % 2 == 0) return false;
  return true;
}
int main() {
  cin >> n >> s;
  for (int i = 0; i < n; ++i) cnt[s[i]]++;
  for (int i = 0; i < 200; ++i) {
    if (cnt[i] % 2) {
      cnt[i] -= 1;
      candidate[num++] = i;
    }
  }
  if (num == 0) {
    string before = "";
    string after = "";
    for (int j = 40; j < 130; ++j) {
      while (cnt[j] >= 2) {
        cnt[j] -= 2;
        before += j;
        after += j;
      }
    }
    cout << 1 << endl;
    reverse(before.begin(), before.end());
    cout << before + after << endl;
    return 0;
  }
  int added = 0;
  while (!check(added)) ++added;
  for (int i = 40; i < 130; ++i) {
    if (!added) break;
    if (cnt[i] > added) {
      for (int j = 0; j < added; ++j) candidate[num++] = i;
      cnt[i] -= added;
      added = 0;
    } else {
      for (int j = 0; j < cnt[i]; ++j) candidate[num++] = i;
      added -= cnt[i];
      cnt[i] = 0;
    }
  }
  cout << num << endl;
  for (int i = 0; i < num; ++i) {
    string before = "";
    string after = "";
    after += char(candidate[i]);
    int remain = (n / num) - 1;
    for (int j = 40; j < 130; ++j) {
      if (!remain) break;
      if (cnt[j] >= remain) {
        for (int k = 0; k < remain / 2; ++k) {
          before += char(j);
          after += char(j);
        }
        cnt[j] -= remain;
        remain = 0;
      } else {
        for (int k = 0; k < cnt[j] / 2; ++k) {
          before += char(j);
          after += char(j);
        }
        remain -= cnt[j];
        cnt[j] = 0;
      }
    }
    reverse(before.begin(), before.end());
    cout << before + after << ' ';
  }
  return 0;
}