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 INF = 0x3f3f3f3f;
const long long INFF = 0x3f3f3f3f3f3f3f3f;
const double pi = acos(-1.0);
const double eps = 1e-9;
const long long mod = 1e9 + 7;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch<'0' | ch> '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
void Out(int aa) {
  if (aa > 9) Out(aa / 10);
  putchar(aa % 10 + '0');
}
char str[400010];
int num[40010];
string s1, s2, s3;
int main() {
  int n = read();
  scanf("%s", str);
  int len = strlen(str);
  int sum = 0;
  for (int i = 0; i < len; i++) num[str[i]]++;
  for (int i = '0'; i <= 'z'; i++)
    if (num[i] % 2) sum++;
  if (sum <= 1) {
    printf("1\n");
    if (sum == 0) {
      for (int i = '0'; i <= 'z'; i++) {
        for (int j = 1; j <= num[i] / 2; j++) {
          s1 += i;
          s2 += i;
        }
      }
      reverse(s2.begin(), s2.end());
      cout << s1 + s2 << endl;
    } else {
      for (int i = '0'; i <= 'z'; i++) {
        for (int j = 1; j <= num[i] / 2; j++) {
          s1 += i;
          s2 += i;
        }
        if (num[i] % 2) s3 = i;
      }
      reverse(s2.begin(), s2.end());
      cout << s1 + s3 + s2 << endl;
    }
  } else {
    for (int i = sum; i <= n; i++) {
      if (n % i == 0 && (n - i) / 2 % i == 0) {
        printf("%d\n", i);
        sum = i;
        int l = n / i;
        while (sum--) {
          s1.clear(), s2.clear(), s3.clear();
          int cnt = 0;
          for (int i = '0'; i <= 'z'; i++) {
            if (cnt >= l) break;
            int tmp = 0;
            if (num[i] < l - cnt && num[i] > 1) {
              tmp = num[i] / 2;
              cnt += num[i] / 2 * 2;
              num[i] -= num[i] / 2 * 2;
            } else if (num[i] > 1 && num[i] >= l - cnt) {
              tmp = (l - 1 - cnt) / 2;
              num[i] -= tmp * 2;
              cnt = l;
            }
            for (int j = 1; j <= tmp; j++) {
              s1 += i;
              s2 += i;
            }
          }
          for (int i = '0'; i <= 'z'; i++)
            if (num[i] % 2 && num[i] > 0) {
              num[i]--;
              s3 = i;
              break;
            }
          if (s3 == "")
            for (int i = '0'; i <= 'z'; i++)
              if (num[i] > 0) {
                num[i]--;
                s3 = i;
                break;
              }
          reverse(s2.begin(), s2.end());
          cout << s1 + s3 + s2 << " ";
        }
        break;
      }
    }
  }
  return 0;
}