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;
void solve() {
  int n;
  cin >> n;
  vector<int> cnt(128, 0);
  for (int i = 0; i < n; i++) {
    char x;
    cin >> x;
    cnt[x]++;
  }
  int odd = 0;
  vector<int> odds;
  for (int i = 0; i < 128; i++) {
    if (cnt[i] & 1) {
      odds.push_back(i);
      odd++;
    }
  }
  if (odd == 0 || odd == 1) {
    cout << 1 << "\n";
    string half = "";
    for (int i = 0; i < 128; i++) {
      int cur_cnt = cnt[i] / 2;
      for (int j = 0; j < cur_cnt; j++) half += (char)i;
    }
    cout << half;
    if (odd) cout << (char)odds[0];
    reverse(half.begin(), half.end());
    {
      cout << half;
      exit(0);
    };
  }
  for (int len = n - (1 - (n & 1)); len >= 1; len -= 2) {
    if (n % len) continue;
    int part_cnt = n / len;
    if (part_cnt < odd) continue;
    if ((part_cnt - odd) & 1) continue;
    cout << part_cnt << "\n";
    for (int j = 0; j < part_cnt; j++) {
      string half = "";
      int need = len / 2;
      for (int i = 0; i < 128; i++) {
        int cur_cnt = min(cnt[i] / 2, need);
        cnt[i] -= cur_cnt * 2;
        need -= cur_cnt;
        for (int j = 0; j < cur_cnt; j++) half += (char)i;
      }
      cout << half;
      if (odds.size()) {
        cout << (char)odds.back();
        cnt[odds.back()]--;
        odds.pop_back();
      } else {
        for (int i = 0; i < 128; i++) {
          if (cnt[i]) {
            odds.push_back(i);
            cout << (char)i;
            cnt[i]--;
            break;
          }
        }
      }
      reverse(half.begin(), half.end());
      cout << half << ' ';
    }
    return;
  }
}
int main() {
  srand(time(0));
  ios_base::sync_with_stdio(0);
  cout << fixed << setprecision(10);
  solve();
  return 0;
}