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;
const int maxN = 4 * 100000 + 10;
map<char, int> cnt;
char ch[maxN];
vector<char> odd, all;
void solve(int tedad) {
  int tul = n / tedad;
  cout << tedad << endl;
  for (int i = 1; i <= tedad; i++) {
    deque<char> s;
    if (!odd.empty()) {
      s.push_front(odd.back());
      odd.pop_back();
    } else {
      s.push_front(all.back());
      all.pop_back();
      if (!all.empty()) {
        odd.push_back(all.back());
        all.pop_back();
      }
    }
    for (int j = 2; j <= tul; j += 2) {
      s.push_front(all.back());
      all.pop_back();
      s.push_back(all.back());
      all.pop_back();
    }
    for (int i = 0; i < s.size(); i++) cout << s[i];
    cout << " ";
  }
  cout << endl;
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> ch[i];
    cnt[ch[i]]++;
  }
  for (int i = 1; i <= n; i++) {
    if (cnt[ch[i]] != 0) {
      if (cnt[ch[i]] % 2) {
        odd.push_back(ch[i]);
        cnt[ch[i]]--;
      }
      for (int j = 1; j <= cnt[ch[i]]; j++) all.push_back(ch[i]);
      cnt[ch[i]] = 0;
    }
  }
  if (odd.size() == 0) {
    cout << 1 << endl;
    deque<char> s;
    for (int j = 1; j <= n; j += 2) {
      s.push_front(all.back());
      all.pop_back();
      s.push_back(all.back());
      all.pop_back();
    }
    for (int i = 0; i < s.size(); i++) cout << s[i];
    cout << " ";
    return 0;
  }
  for (int i = (int)odd.size(); i <= n; i++) {
    if (n % i == 0 && (n / i) % 2 == 1 && (i - odd.size()) % 2 == 0) {
      solve(i);
    }
  }
  return 0;
}