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>
const int M = 1003;
void MultL(long long int &a, long long int b) { a = (a * b) % M; }
void AddL(long long int &a, long long int b) { a = (a + (b + M)) % M; }
long long int Mult(long long int a, long long int b) { return (a * b) % M; }
long long int Add(long long int a, long long int b) {
  return (a + (b + M)) % M;
}
using namespace std;
int main() {
  int n;
  cin >> n;
  string str;
  cin >> str;
  unordered_map<char, int> un;
  for (int i = 0; i < str.size(); ++i) ++un[str[i]];
  string odd;
  string even;
  for (auto &f : un) {
    if (f.second % 2 == 1) {
      f.second -= 1;
      odd.push_back(f.first);
    }
    for (int i = 0; i < f.second / 2; ++i) {
      even.push_back(f.first);
    }
  }
  if (odd.size() == 0) {
    string even_r = even;
    reverse(even_r.begin(), even_r.end());
    cout << 1 << endl;
    cout << even + even_r << endl;
    return 0;
  }
  vector<string> res;
  for (int L = n; L >= 1; --L) {
    if ((L & 1) == 0) continue;
    int residual_even = int(even.size()) * 2 - int(odd.size()) * (L - 1);
    if (residual_even >= 0 && residual_even % L == 0) {
      int add_to_odd = residual_even / L;
      assert(add_to_odd % 2 == 0);
      while (add_to_odd) {
        odd.push_back(even.back());
        odd.push_back(even.back());
        even.pop_back();
        add_to_odd -= 2;
      }
      for (char c : odd) {
        string p1;
        while (p1.size() != L / 2) {
          p1.push_back(even.back());
          even.pop_back();
        }
        string p2 = p1;
        reverse(p2.begin(), p2.end());
        res.push_back(p1 + c + p2);
      }
      break;
    }
  }
  cout << res.size() << endl;
  for (int i = 0; i < res.size(); ++i) {
    cout << res[i] << ' ';
  }
  cout << endl;
  return 0;
}