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::sync_with_stdio(false);
  cin.tie(0);
  int n, cnt = 0;
  string s;
  cin >> n >> s;
  unordered_map<char, int> m;
  vector<string> v;
  for (auto &i : s) m[i]++;
  stringstream ss;
  for (auto &i : m) {
    string ss;
    if (i.second % 2) {
      string ss;
      ss.push_back(i.first);
      i.second--;
      cnt++;
      v.push_back(ss);
    }
  }
  if (cnt == 0) {
    string s2, s3;
    for (auto &i : m) {
      for (int j = 0; (2 * j) < i.second; j++) {
        s2.push_back(i.first);
      }
    }
    s3 = s2;
    reverse(s3.begin(), s3.end());
    s2 += s3;
    cout << "1\n" << s2;
  } else {
    for (; (n % cnt) || ((n / cnt) % 2 == 0); cnt += 2)
      ;
    int len = n / cnt, idx = 0;
    cout << cnt << '\n';
    string s2;
    assert((cnt - v.size()) % 2 == 0);
    for (auto &i : m) {
      if (v.size() >= cnt) break;
      while (i.second > 0 && (v.size() < cnt)) {
        string ss;
        ss.push_back(i.first);
        v.push_back(ss);
        v.push_back(ss);
        i.second -= 2;
      }
    }
    for (auto &i : m) {
      while (i.second > 0) {
        if ((2 * s2.size() + 1) == len) {
          cerr << s2 << endl;
          v[idx] = s2 + v[idx];
          reverse(s2.begin(), s2.end());
          cerr << s2 << endl;
          v[idx] += s2;
          idx++;
          s2 = "";
        }
        s2.push_back(i.first);
        i.second -= 2;
      }
    }
    if ((idx < v.size()) && (2 * s2.size() + 1) == len) {
      cerr << s2 << endl;
      v[idx] = s2 + v[idx];
      reverse(s2.begin(), s2.end());
      cerr << s2 << endl;
      v[idx] += s2;
      idx++;
      s2 = "";
    }
    for (auto &i : v) cout << i << " ";
  }
  return 0;
}