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 = 1000000007L;
const int SIZE = 800010;
int cnt[300];
char ans[SIZE];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(15);
  int n;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < n; i++) {
    cnt[s[i]]++;
  }
  int odd = 0, even = 0;
  for (int i = 0; i < 300; i++) {
    if (cnt[i] % 2 != 0)
      odd++;
    else
      even++;
  }
  int a = n;
  for (int i = 1; i <= n; i++) {
    int x = n / i;
    if (x * i != n) continue;
    bool flag = 0;
    int o = odd;
    int e = even;
    if (x % 2) {
      if (o > i) flag = 1;
    } else {
      if (o) flag = 1;
    }
    if (!flag) {
      a = i;
      break;
    }
  }
  cout << a << endl;
  int x = n / a;
  if (x % 2) {
    for (int i = 0; i < a; i++) {
      int mid = x / 2;
      int j = 0;
      int idx = 0;
      while (j <= mid) {
        for (int k = 0; k < 300 && j < mid; k++) {
          while (j < mid && cnt[k] >= 2) {
            cnt[k] -= 2;
            char ch = (char)k;
            j++;
            ans[idx] = ch;
            ans[x - 1 - idx] = ch;
            idx++;
          }
        }
        char ch;
        bool flag = 0;
        for (int k = 0; k < 300; k++) {
          if (cnt[k] % 2 != 0) {
            flag = 1;
            ch = (char)k;
            cnt[k] -= 1;
            j++;
            break;
          }
        }
        if (!flag) {
          for (int k = 0; k < 300; k++) {
            if (cnt[k] > 0) {
              cnt[k] -= 1;
              ch = (char)k;
              j++;
              break;
            }
          }
        }
        ans[idx] = ch;
        idx++;
      }
      cout << ans << " ";
    }
    cout << endl;
  } else {
    for (int i = 0; i < a; i++) {
      int mid = x / 2;
      int j = 0;
      int idx = 0;
      while (j < mid) {
        for (int k = 0; k < 300 && j < mid; k++) {
          while (j < mid && cnt[k] >= 2) {
            cnt[k] -= 2;
            char ch = (char)k;
            j++;
            ans[idx] = ch;
            ans[x - 1 - idx] = ch;
            idx++;
          }
        }
      }
      cout << ans << " ";
    }
    cout << endl;
  }
  return 0;
}