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 mod = 998244353;
const int N = 500006;
const long long INF = 1e18;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  set<int> divs;
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      divs.insert(i);
      divs.insert(n / i);
    }
  }
  map<char, int> h;
  for (int i = 1; i <= n; i++) {
    char c;
    cin >> c;
    h[c]++;
  }
  int cnt = 0;
  int alone = 0;
  for (auto it : h) {
    cnt += it.second / 2;
    alone += it.second % 2;
  }
  int ans;
  int one, two;
  for (auto it : divs) {
    int cnt_each = n / it;
    int need_2 = (cnt_each / 2) * it;
    int need_1 = n - need_2 * 2;
    if (cnt < need_2) continue;
    int temp_2 = cnt;
    temp_2 -= need_2;
    if (temp_2 * 2 + alone == need_1) {
      one = alone;
      two = temp_2;
      ans = it;
      break;
    }
  }
  vector<char> sing;
  for (auto &it : h) {
    if (it.second & 1) {
      sing.push_back(it.first);
      it.second--;
    }
  }
  for (auto &it : h) {
    if (two) {
      int mn = min(two, it.second / 2);
      two -= mn;
      it.second -= mn * 2;
      for (int i = 1; i <= mn * 2; i++) {
        sing.push_back(it.first);
      }
    }
  }
  int len = n / ans;
  cout << ans << '\n';
  for (int i = 1; i <= ans; i++) {
    vector<char> str(len + 1);
    int l = 1, r = len;
    while (l < r) {
      auto it = h.begin();
      if (it->second == 0) {
        h.erase(it);
        continue;
      }
      it->second -= 2;
      if (it->second == 0) {
        h.erase(it);
      }
      str[l] = str[r] = it->first;
      l++;
      r--;
    }
    if (l == r) {
      str[l] = sing.back();
      sing.pop_back();
    }
    for (int j = 1; j <= len; j++) {
      cout << str[j];
    }
    cout << ' ';
  }
  return 0;
}