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 N = 400400;
char s[N];
int ans[N], n, b[N];
queue<int> q1, q2;
void init() {
  scanf("%d", &n);
  scanf("%s", s);
}
int Get(char x) {
  if (x >= '0' && x <= '9') return x - '0';
  if (x >= 'A' && x <= 'Z') return x - 'A' + 10;
  if (x >= 'a' && x <= 'z') return x - 'a' + 10 + 26;
}
char reGet(int x) {
  if (x >= 0 && x <= 9) return x + '0';
  if (x >= 10 && x <= 35) return x + 'A' - 10;
  if (x >= 36) return x + 'a' - 10 - 26;
}
void solve() {
  for (int i = 0; i < n; i++) {
    int op = Get(s[i]);
    b[op]++;
  }
  int m = Get('z') + 1, tot = 0, k = 0;
  for (int i = 0; i < m; i++) {
    if (!b[i]) continue;
    if (b[i] & 1) {
      tot++;
      q1.push(i);
      if (b[i] > 2) q2.push(i);
    } else {
      q2.push(i);
    }
  }
  if (tot == 0) {
    printf("1\n");
    int c = 0, tmp;
    while (!q2.empty()) {
      tmp = q2.front();
      ans[++c] = tmp;
      b[tmp] -= 2;
      if (!b[tmp]) q2.pop();
    }
    for (int i = 1; i <= c; i++) printf("%c", reGet(ans[i]));
    for (int i = c; i >= 1; i--) printf("%c", reGet(ans[i]));
    return;
  } else {
    for (int i = tot; i <= n; i++)
      if (n % i == 0 && ((n / i) & 1)) {
        k = n / i;
        break;
      }
  }
  printf("%d\n", n / k);
  for (int i = 1; i <= n / k; i++) {
    int mid, c = 0;
    if (q1.empty()) {
      mid = q2.front();
      b[mid]--;
      if (b[mid] < 2) q2.pop();
      q1.push(mid);
    } else {
      mid = q1.front();
      q1.pop();
      b[mid]--;
    }
    for (int i = 1; i <= (k - 1) / 2; i++) {
      int tmp = q2.front();
      b[tmp] -= 2;
      if (b[tmp] < 2) q2.pop();
      ans[++c] = tmp;
    }
    for (int i = 1; i <= c; i++) printf("%c", reGet(ans[i]));
    printf("%c", reGet(mid));
    for (int i = c; i >= 1; i--) printf("%c", reGet(ans[i]));
    printf(" ");
  }
}
int main() {
  init();
  solve();
  return 0;
}