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;
bool comp(const int a, const int b) { return a < b; }
bool RelativelyPrime(int a, int b) {
  return (a < b)    ? RelativelyPrime(b, a)
         : !(a % b) ? (b == 1)
                    : RelativelyPrime(b, a % b);
}
int ceil1(int a, int x) {
  int sum = a / x;
  if (a % x)
    return sum + 1;
  else
    return sum;
}
vector<pair<char, char>> a;
vector<char> b;
char c[500005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  sort(s.begin(), s.end());
  int j = 0, i = 0;
  while (i < n) {
    if (i != n - 1 && s[i] == s[i + 1]) {
      a.push_back({s[i], s[i + 1]});
      i = i + 2;
    } else {
      b.push_back(s[i]);
      i = i + 1;
    }
  }
  int l = b.size();
  j = a.size();
  if (l == 0) {
    cout << 1 << endl;
    for (int i = 0; i < j; i++) {
      c[i] = a[i].first;
      c[n - i - 1] = a[i].second;
    }
    cout << c;
    return 0;
  }
  while (j % l != 0 && j > 0) {
    j--;
    l += 2;
    b.push_back(a[j].first);
    b.push_back(a[j].second);
  }
  if (j % l != 0) {
    cout << n << endl;
    for (int i = 0; i < n; i++) {
      cout << s[i] << " ";
    }
    return 0;
  }
  int k = 0, m = 0;
  if (j % l == 0) {
    int t = (j / l);
    int size = t * 2 + 1;
    cout << n / size << endl;
    for (i = 0; i < l; i++) {
      c[t] = b[k];
      k++;
      for (int x = 0; x < t; x++) {
        c[x] = a[m].first;
        c[size - 1 - x] = a[m].second;
        m++;
      }
      cout << c << " ";
    }
  }
  return 0;
}