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 int MOD = 1e9 + 7;
const int MAX = 1e5 + 55;
const int INF = 1e9 + 77;
const long long INF_INF = 1e18 + 1e17;
const long double PI = acos(-1.0);
long long Power(long long x, long long y) {
  if (!y) return 1;
  long long s = Power(x, y >> 1);
  s *= s;
  if (y & 1) s *= x;
  return s;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  map<char, int> freq;
  for (int i = 0; i < n; i++) {
    freq[s[i]]++;
  }
  int howOdd = 0;
  for (auto i : freq) {
    howOdd += (i.second & 1);
  }
  if (!howOdd) {
    cout << 1 << '\n';
    string ans = "";
    for (auto i : freq) {
      for (int j = 0; j < ((i.second) >> 1); j++) {
        ans += i.first;
      }
    }
    cout << ans;
    reverse(ans.begin(), ans.end());
    cout << ans;
  } else if (howOdd == 1) {
    cout << 1 << '\n';
    string ans = "";
    char helper;
    for (auto i : freq) {
      if (i.second & 1) {
        helper = i.first;
      }
      for (int j = 0; j < ((i.second) >> 1); j++) {
        ans += i.first;
      }
    }
    cout << ans << helper;
    reverse(ans.begin(), ans.end());
    cout << ans;
  } else {
    int need = howOdd;
    while (1) {
      if (n - need < (need << 1)) {
        need = n;
        break;
      } else if ((((n - need) % need) == 0) &&
                 ((((n - need) / need) % 2 == 0))) {
        break;
      } else {
        need += 2;
      }
    }
    int needSave = need;
    vector<string> ans;
    vector<char> toDelete;
    for (auto &i : freq) {
      if (i.second & 1) {
        string temp = "";
        temp += i.first;
        ans.push_back(temp);
        need--;
        i.second--;
        if (!i.second) {
          toDelete.push_back(i.first);
        }
      }
    }
    for (int i = 0; i < (int)toDelete.size(); i++) {
      freq.erase(toDelete[i]);
    }
    while (need) {
      pair<char, int> cur = *(freq.begin());
      freq.erase(freq.begin());
      while (need && (cur.second > 0)) {
        string temp = "";
        temp += cur.first;
        ans.push_back(temp);
        ans.push_back(temp);
        cur.second -= 2;
        need -= 2;
      }
      if (cur.second) {
        freq.insert(cur);
      }
    }
    int howEach = ((n - needSave) / needSave) >> 1;
    cout << needSave << '\n';
    for (int i = 0; i < (int)ans.size(); i++) {
      string helper = "";
      for (int j = 0; j < howEach; j++) {
        pair<char, int> cur = *freq.begin();
        freq.erase(freq.begin());
        cur.second -= 2;
        helper += cur.first;
        if (cur.second) {
          freq.insert(cur);
        }
      }
      string tareq = helper + ans[i];
      reverse(helper.begin(), helper.end());
      tareq += helper;
      cout << tareq << " ";
    }
  }
  return 0;
}