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 main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long n;
  cin >> n;
  string x;
  cin >> x;
  map<long long, long long> m1;
  for (long long i = 0; i < n; i++) {
    m1[x[i]]++;
  }
  vector<char> p;
  vector<char> s;
  long long cnt = 0;
  for (auto i : m1) {
    cnt = cnt + i.second / 2;
    long long k2 = i.second - (i.second / 2) * 2;
    for (long long j = 0; j < i.second / 2; j++) {
      p.push_back(i.first);
    }
    if (k2 == 1) s.push_back(i.first);
  }
  long long ans = -1;
  for (long long i = n; i >= 1; i--) {
    if (n % i == 0) {
      long long len = i;
      long long num = n / i;
      if (len % 2 == 0) {
        if (cnt >= len / 2) {
          ans = i;
        }
      } else {
        long long used_pairs = (len / 2);
        if (cnt < used_pairs) continue;
        long long r1 = n - 2 * used_pairs;
        if (r1 >= num) {
          ans = i;
        }
      }
      if (ans != i) continue;
      long long us = 0;
      long long l = ans;
      long long nu = n / ans;
      char op[nu][l];
      long long c1 = 0;
      long long c2 = 0;
      long long fl = 0;
      for (long long i = 0; i < nu; i++) {
        for (long long j = 0; j < l / 2; j++) {
          if (c1 == p.size()) {
            fl = 1;
            break;
          }
          op[i][j] = op[i][l - 1 - j] = p[c1];
          us = us + 2;
          c1++;
        }
        if (fl) break;
        if (l % 2 == 0) continue;
        if (c2 == s.size()) {
          if (c1 == p.size()) {
            fl = 1;
            break;
          }
          char m2 = p[c1];
          c1++;
          s.push_back(m2);
          op[i][l / 2] = m2;
          us++;
          continue;
        }
        if (fl) break;
        op[i][l / 2] = s[c2];
        c2++;
        us++;
      }
      if (fl) continue;
      if (us != n) continue;
      cout << n / ans << endl;
      for (long long i = 0; i < nu; i++) {
        for (long long j = 0; j < l; j++) cout << op[i][j];
        cout << " ";
      }
      cout << endl;
      exit(0);
    }
  }
}