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>
void print(long *a, long size) {
  long i;
  for (i = 1; i < size; i++) {
    printf("%ld ", a[i]);
  }
  printf("%ld\n", a[i]);
}
char encode[10000];
long pan[2000000], temp[2000000], num[2000000], count[2000000];
long n, ans;
void ini() {
  long i;
  for (i = 1; i <= 10; i++) {
    encode[i] = '0' + i - 1;
  }
  for (i = 11; i <= 36; i++) {
    encode[i] = 'a' + i - 11;
  }
  for (i = 37; i <= 62; i++) {
    encode[i] = 'A' + i - 37;
  }
}
int legal(char ch) {
  long ans;
  ans = 0;
  if (isalpha(ch) != 0) {
    if (islower(ch) != 0) {
      ans = ch - 'a' + 11;
    } else {
      ans = ch - 'A' + 37;
    }
  } else {
    if (isdigit(ch) != 0) {
      ans = ch - '0' + 1;
    }
  }
  return ans;
}
char str[2000000];
int main() {
  long i, j, k, a, b, c, l, odd;
  ini();
  scanf("%ld", &n);
  while (1) {
    gets(str);
    if (legal(*str) != 0) {
      break;
    }
  }
  for (i = 1, j = 0; i <= n; i++, j++) {
    num[i] = legal(str[j]);
    if (num[i] <= 0) {
      while (1) {
        a += 1;
      }
    }
  }
  memset(count, 0, sizeof(*count) * (100));
  for (i = 1; i <= n; i++) {
    count[num[i]] += 1;
  }
  odd = 0;
  for (i = 1; i <= 100; i++) {
    odd += count[i] & 1;
  }
  for (i = n; i > 1; i--) {
    if (n % i == 0) {
      k = n / i;
      if (i & 1) {
        if (odd <= k) {
          goto SUCC;
        } else {
          goto FAIL;
        }
      } else {
        if (odd == 0) {
          goto SUCC;
        } else {
          goto FAIL;
        }
      }
    FAIL:
      continue;
    }
  }
SUCC:
  ans = i;
  k = n / i;
  memset(pan, 0, sizeof(*pan) * (k + 1));
  if (ans & 1) {
    for (i = 1, j = 0; i <= 100; i++) {
      if (count[i] & 1) {
        count[i] -= 1;
        pan[++j] = i;
      }
    }
    for (j += 1, i = 1; j + 1 <= k; j += 2) {
      while (count[i] <= 0) {
        i += 1;
      }
      pan[j] = i;
      pan[j + 1] = i;
      count[i] -= 2;
    }
  }
  printf("%ld\n", k);
  l = 1;
  for (i = 1; i <= k; i++) {
    for (j = 1; j <= (ans >> 1); j++) {
      while (count[l] <= 0) {
        l += 1;
      }
      temp[j] = l;
      count[l] -= 2;
    }
    for (j = 1; j <= (ans >> 1); j++) {
      printf("%c", encode[temp[j]]);
    }
    if (pan[i] > 0) {
      printf("%c", encode[pan[i]]);
    }
    for (j = (ans >> 1); j >= 1; j--) {
      printf("%c", encode[temp[j]]);
    }
    if (i < k) {
      printf(" ");
    }
  }
  printf("\n");
  return 0;
}