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;
int N, cnt[128], iss[128], tots, lef;
char ss[400005], out[400005];
void print() {
  printf("%d\n", tots);
  int len = lef / tots / 2;
  for (int i = 48; i <= 122; i++) {
    if (iss[i]) {
      tots--;
      cnt[i]--;
      for (int j = 48, tlen = 0; j <= 122; j++) {
        if (!cnt[j]) continue;
        if (len - tlen >= cnt[j] / 2) {
          cnt[j] /= 2;
          while (cnt[j]) out[++tlen] = j, cnt[j]--;
        } else {
          while (len - tlen) {
            out[++tlen] = j;
            cnt[j] -= 2;
          }
          break;
        }
      }
      for (int j = 1; j <= len; j++) printf("%c", out[j]);
      printf("%c", i);
      for (int j = len; j >= 1; j--) printf("%c", out[j]);
      printf(" ");
    }
  }
  for (int i = 1; i <= tots; i += 2) {
    for (int j = 48; j <= 122; j++) {
      while (cnt[j]) {
        lef -= 2;
        cnt[j] -= 2;
        for (int k = 48, tlen = 0; k <= 122; k++) {
          if (!cnt[k]) continue;
          if (len - tlen > cnt[k] / 2) {
            cnt[k] /= 2;
            while (cnt[k]) out[++tlen] = k, cnt[k]--;
          } else {
            while (len - tlen) {
              out[++tlen] = k;
              cnt[k] -= 2;
            }
          }
        }
        for (int k = 1; k <= len; k++) printf("%c", out[k]);
        printf("%c", j);
        for (int k = len; k >= 1; k--) printf("%c", out[k]);
        printf(" ");
        for (int k = 48, tlen = 0; k <= 122; k++) {
          if (!cnt[k]) continue;
          if (cnt[k] && len - tlen > cnt[k] / 2) {
            cnt[k] /= 2;
            while (cnt[k]) out[++tlen] = k, cnt[k]--;
          } else {
            while (len - tlen) {
              out[++tlen] = k;
              cnt[k] -= 2;
            }
          }
        }
        for (int k = 1; k <= len; k++) printf("%c", out[k]);
        printf("%c", j);
        for (int k = len; k >= 1; k--) printf("%c", out[k]);
        printf(" ");
      }
    }
  }
}
void solve() {
  if (tots == 0) {
    printf("1\n");
    for (int i = 1; i <= 127; i++)
      if (cnt[i]) {
        int tmp = cnt[i] / 2;
        for (int j = 1; j <= tmp; j++) printf("%c", i);
      }
    for (int i = 127; i >= 1; i--)
      if (cnt[i]) {
        int tmp = cnt[i] / 2;
        for (int j = 1; j <= tmp; j++) printf("%c", i);
      }
    exit(0);
  }
  for (; lef >= 2 * tots; lef -= 2, tots += 2)
    if (lef % tots == 0 && (lef / tots) % 2 == 0) {
      print();
      exit(0);
    }
  printf("%d\n", N);
  for (int i = 1; i <= N; i++) printf("%c ", ss[i]);
}
int main() {
  scanf("%d", &N);
  scanf("%s", ss + 1);
  for (int i = 1; i <= N; i++) cnt[ss[i]]++;
  for (int i = 48; i <= 122; i++) {
    if (cnt[i] & 1) {
      tots++;
      iss[i] = 1;
    }
  }
  lef = N - tots;
  solve();
}