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 = (int)1e9 + 7;
const int N = (int)1e5 + 2;
list<char> ls[4 * N];
const int M = 131;
int bkt[M];
int main() {
  int n;
  cin >> n;
  string str;
  cin >> str;
  for (int i = 0; i < str.size(); i++) {
    bkt[(int)str[i]]++;
  }
  int oddcnt = 0, oddsz = 0;
  for (int i = 0; i < M; i++) {
    if (bkt[i] % 2 == 1) {
      oddcnt++;
    }
  }
  if (!oddcnt) {
    int ln = 0;
    printf("1\n");
    for (int i = 0; i < M; i++) {
      while (bkt[i]) {
        ls[ln].push_back((char)i);
        ls[ln].push_front((char)i);
        bkt[i] -= 2;
      }
    }
    for (auto ch : ls[ln]) {
      printf("%c", ch);
    }
    printf("\n");
  } else {
    int tmp = n - oddcnt;
    int idx = 0;
    while (!((tmp - idx) % (oddcnt + idx) == 0 &&
             ((tmp - idx) / (oddcnt + idx)) % 2 == 0)) {
      idx += 2;
      if (tmp - idx < 0) break;
    }
    int itr = idx;
    if (tmp - idx < 0) {
      printf("%d\n", n);
      for (int i = 0; i < str.size(); i++) printf("%c ", str[i]);
      printf("\n");
    } else {
      int xx = 0;
      for (int i = 0; i < M; i++) {
        if (bkt[i] % 2 == 1) {
          bkt[i] -= 1;
          ls[xx++].push_back((char)i);
        }
        while (idx && bkt[i] >= 2) {
          ls[xx++].push_back((char)i);
          ls[xx++].push_back((char)i);
          idx -= 2;
          bkt[i] -= 2;
        }
      }
      if (idx != 0) {
        printf("%d\n", n);
        for (int i = 0; i < str.size(); i++) printf("%c ", str[i]);
        printf("\n");
      } else {
        int sz = ((tmp - itr) / (oddcnt + itr)) + 1, j = 0;
        for (int i = 0; i < xx; i++) {
          while (ls[i].size() < sz) {
            if (bkt[j] > 0) {
              ls[i].push_back((char)j);
              ls[i].push_front((char)j);
              bkt[j] -= 2;
            } else
              j++;
          }
        }
        printf("%d\n", xx);
        for (int i = 0; i < xx; i++) {
          for (auto ch : ls[i]) {
            printf("%c", ch);
          }
          printf(" ");
        }
        printf("\n");
      }
    }
  }
  return 0;
}