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;
long long junger = 0, mid = 0, top = 0, bot = 0, result = 0, sum = 0, s = 0,
          t = 0, d = 0, l = 0, sp = 0, k = 0, x, y, n, m, test;
bool kt = false;
string s1, s2;
long long a[256];
bool checkA() {
  for (long long(i) = (0); (i) < (255); (i)++)
    if (a[i] & 1) return false;
  return true;
}
int countA() {
  long long dem = 0;
  for (long long(i) = (0); (i) < (255); (i)++)
    if (a[i] & 1) dem++;
  return dem;
}
int main() {
  cin >> n;
  vector<long long> le;
  long long chan = 2;
  for (long long(i) = (1); (i) < (n + 1); (i)++) {
    if (n % i == 0) {
      if (i & 1) le.push_back(i);
    }
  }
  cin >> s1;
  memset(a, 0, sizeof(a));
  for (long long(i) = (0); (i) < (n); (i)++) a[s1[i]]++;
  if (checkA()) {
    cout << "1\n";
    stack<char> st;
    for (long long(i) = (0); (i) < (255); (i)++) {
      while (a[i] > 0) {
        printf("%c", (char)i);
        a[i] -= 2;
        st.push((char)i);
      }
    }
    while (!st.empty()) {
      printf("%c", st.top());
      st.pop();
    }
    printf("\n");
    return 0;
  }
  m = countA();
  for (long long(j) = (le.size()) - 1; (j) >= 0; (j)--) {
    d = n / le[j];
    if (d < m)
      continue;
    else {
      stack<char> st;
      for (long long(i) = (0); (i) < (255); (i)++) {
        if (a[i] & 1) {
          st.push((char)i);
          a[i]--;
          d--;
        }
      }
      for (long long(i) = (0); (i) < (255); (i)++) {
        while (a[i] > 0 && d > 0) {
          st.push((char)i);
          a[i]--;
          d--;
        }
      }
      d = n / le[j];
      printf("%lld\n", d);
      for (long long(i) = (0); (i) < (d); (i)++) {
        stack<char> st2;
        l = le[j] / 2;
        for (long long(k) = (0); (k) < (255); (k)++) {
          while (a[k] > 0 && l > 0) {
            printf("%c", (char)k);
            a[k] -= 2;
            st2.push((char)k);
            l--;
          }
        }
        printf("%c", st.top());
        st.pop();
        while (!st2.empty()) {
          printf("%c", st2.top());
          st2.pop();
        }
        printf(" ");
      }
      printf("\n");
      return 0;
    }
  }
  return 0;
}