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 long long int infinity = 9e18;
bool compare(long long int a, long long int b) { return a > b; }
bool isPossible(map<char, int> &m, int n, int len) {
  int pairs = (n / len) * (len / 2);
  int singles = (n / len) * (len & 1);
  bool val = 0;
  for (auto i : m) {
    if (pairs) {
      int pair = (i.second / 2);
      pairs = max(0, (pairs - pair));
    }
  }
  if (pairs == 0) {
    pairs = (n / len) * (len / 2);
    vector<string> v(n / len);
    int j = 0;
    string s;
    for (auto i : m) {
      if (pairs) {
        int pair = (i.second / 2);
        if (pairs - pair < 0) {
          pair = pairs;
          pairs = 0;
        } else {
          pairs = pairs - pair;
        }
        i.second -= 2 * pair;
        while (pair) {
          while (s.size() < (len / 2)) {
            s += i.first;
            pair--;
            if (pair == 0) {
              break;
            }
          }
          if (s.size() && s.size() == (len / 2)) {
            v[j++] = s;
            s = "";
          }
          if (pair == 0) break;
        }
        m[i.first] = i.second;
      }
    }
    j = 0;
    for (auto i : m) {
      while (i.second) {
        v[j++] += i.first;
        i.second--;
      }
    }
    cout << v.size() << "\n";
    for (int i = 0; i < v.size(); i++) {
      string s = v[i].substr(0, v[i].size() - 1 * (singles != 0));
      reverse(s.begin(), s.end());
      v[i] += s;
      cout << v[i] << " ";
    }
    return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<long long int> factors;
  long long int i = 1;
  for (; i * i < n; i++) {
    if (n % i == 0) {
      factors.push_back(i);
      factors.push_back(n / i);
    }
  }
  if (i * i == n) factors.push_back(i);
  sort(factors.begin(), factors.end(), compare);
  map<char, int> m;
  for (auto i : s) {
    m[i]++;
  }
  for (int i = 0; i < factors.size() - 1; i++) {
    if (isPossible(m, n, factors[i])) {
      return 0;
    }
  }
  cout << n << "\n";
  for (auto i : s) {
    cout << i << " ";
  }
  return 0;
}