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 maxn = 4e5 + 10;
int n, m, a[maxn], ji;
string s;
int transfrom(char s) {
  if (s >= 'a' && s <= 'z')
    return s - 'a';
  else if (s >= 'A' && s <= 'Z')
    return s - 'A' + 26;
  else
    return s - '0' + 52;
}
char reist(int s) {
  if (s >= 0 && s <= 25)
    return char('a' + s);
  else if (s >= 26 && s <= 51)
    return char('A' + s - 26);
  else
    return char(s - 52 + '0');
}
char find() {
  for (int i = 0; i <= 61; i++)
    if (a[i] >= 2) {
      a[i] -= 2;
      return reist(i);
    }
}
string my_reverse(string s) {
  string now = "";
  for (int i = s.length() - 1; i >= 0; i--) now += s[i];
  return now;
}
void run_even(int x) {
  cout << n / x << endl;
  for (int i = 1; i <= n / x; i++) {
    string s = "";
    for (int j = 1; j <= x / 2; j++) s += find();
    cout << s + my_reverse(s) << " ";
  }
  exit(0);
}
void run_odd(int x) {
  cout << n / x << endl;
  for (int i = 1; i <= n / x; i++) {
    string s = "", mid = "";
    for (int j = 1; j <= x / 2; j++) s += find();
    int flag = 0;
    for (int j = 0; j <= 61; j++)
      if (a[j] % 2 == 1 && !flag) mid += reist(j), a[j]--, flag = 1;
    for (int j = 0; j <= 61; j++)
      if (a[j] && !flag) mid += reist(j), a[j]--, flag = 1;
    cout << s + mid + my_reverse(s) << " ";
  }
  exit(0);
}
int main() {
  cin >> n >> s;
  for (int i = 0; i < s.length(); i++) a[transfrom(s[i])]++;
  for (int i = 0; i <= 61; i++)
    if (a[i] % 2 == 1) ji++;
  if (ji == 0) run_even(n);
  for (int i = n; i >= 1; i--) {
    if (n % i != 0) continue;
    if (i % 2 == 0) continue;
    if (n / i < ji)
      continue;
    else {
      int s = n / i - ji;
      if (s % 2 == 1)
        continue;
      else
        run_odd(i);
    }
  }
}