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;
string str;
int nums[100];
int N;
string jzt[500000];
int main() {
  scanf("%d", &N);
  cin >> str;
  int i, j, k;
  int len = str.length();
  for (i = 0; i < len; i++) {
    if (str[i] >= '0' && str[i] <= '9')
      nums[26 + str[i] - '0']++;
    else if (str[i] >= 'a' && str[i] <= 'z')
      nums[str[i] - 'a']++;
    else
      nums[str[i] - 'A' + 36]++;
  }
  int L, cnt = 0;
  int ans = 0;
  for (cnt = 1; cnt <= N; cnt++) {
    if (N % cnt == 0) {
      int tnum[100];
      for (i = 0; i <= 70; i++) tnum[i] = nums[i];
      L = N / cnt;
      bool fuck = true;
      for (int tot = 1; tot <= cnt && fuck; tot++) {
        if (L % 2 == 0) {
          int tl = 0;
          while (tl < L) {
            bool flag = false;
            for (j = 0; j <= 70; j++) {
              if (tnum[j] >= 2) {
                tnum[j] -= 2;
                flag = true;
                break;
              }
            }
            tl += 2;
            if (flag == false) fuck = false;
          }
        } else {
          int tl = 0;
          while (tl < L - 1) {
            bool flag = false;
            for (j = 0; j <= 70; j++) {
              if (tnum[j] >= 2) {
                tnum[j] -= 2;
                flag = true;
                break;
              }
            }
            tl += 2;
            if (flag == false) fuck = false;
          }
        }
      }
      if (fuck) {
        ans = cnt;
        break;
      }
    }
  }
  cout << ans << endl;
  cnt = ans;
  L = N / cnt;
  for (int tot = 1; tot <= cnt; tot++) {
    if (L % 2 == 0) {
      int tl = 0;
      while (tl < L) {
        bool flag = false;
        for (j = 0; j <= 70; j++) {
          if (nums[j] >= 2) {
            nums[j] -= 2;
            if (j >= 36)
              jzt[tot] += 'A' + j - 36;
            else if (j >= 26)
              jzt[tot] += '0' + j - 26;
            else
              jzt[tot] += 'a' + j;
            break;
          }
        }
        tl += 2;
      }
    } else {
      int tl = 0;
      while (tl < L - 1) {
        bool flag = false;
        for (j = 0; j <= 70; j++) {
          if (nums[j] >= 2) {
            nums[j] -= 2;
            if (j >= 36)
              jzt[tot] += 'A' + j - 36;
            else if (j >= 26)
              jzt[tot] += '0' + j - 26;
            else
              jzt[tot] += 'a' + j;
            break;
          }
        }
        tl += 2;
      }
    }
  }
  for (int tot = 1; tot <= cnt; tot++) {
    cout << jzt[tot];
    for (j = 0; j <= 70; j++) {
      if (nums[j] > 0) {
        nums[j]--;
        char ch;
        if (j >= 36)
          ch = 'A' + j - 36;
        else if (j >= 26)
          ch = '0' + j - 26;
        else
          ch = 'a' + j;
        cout << ch;
        break;
      }
    }
    int plen = jzt[tot].length();
    for (j = plen - 1; j >= 0; j--) cout << jzt[tot][j];
    cout << " ";
  }
  return 0;
}