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;
template <class A>
void pr(A a) {
  cout << a;
  cout << '\n';
}
template <class A, class B>
void pr(A a, B b) {
  cout << a << ' ';
  pr(b);
}
template <class A, class B, class C>
void pr(A a, B b, C c) {
  cout << a << ' ';
  pr(b, c);
}
template <class A, class B, class C, class D>
void pr(A a, B b, C c, D d) {
  cout << a << ' ';
  pr(b, c, d);
}
template <class A>
void PR(A a, long long n) {
  for (int i = (int)(0); i < (int)(n); i++) {
    if (i) cout << ' ';
    cout << a[i];
  }
  cout << '\n';
}
long long check(long long n, long long m, long long x, long long y) {
  return x >= 0 && x < n && y >= 0 && y < m;
}
const long long MAX = 1000000007, MAXL = 1LL << 61, dx[4] = {-1, 0, 1, 0},
                dy[4] = {0, 1, 0, -1};
void Main() {
  long long n;
  string s;
  cin >> n >> s;
  map<char, int> m;
  for (int i = (int)(0); i < (int)(s.size()); i++) m[s[i]]++;
  long long x = 0, y = 0;
  for (__typeof((m).begin()) it = (m).begin(); it != (m).end(); it++) {
    if (it->second % 2) x++;
    y += it->second / 2;
  }
  for (int k = (int)(max(1LL, x)); k < (int)(n + 1); k++) {
    if (n % k) continue;
    long long z = k;
    z -= x;
    if (x) {
      if (z % 2 || y - z / 2 < 0 || (y - z / 2) % k) continue;
    }
    deque<char> q[k];
    string s[k];
    int j = 0;
    for (__typeof((m).begin()) it = (m).begin(); it != (m).end(); it++) {
      if (it->second % 2) {
        q[j].push_back(it->first);
        it->second--;
        j = (j + 1) % k;
      }
    }
    if (x) {
      for (__typeof((m).begin()) it = (m).begin(); it != (m).end(); it++) {
        while (it->second && z) {
          z -= 2;
          it->second -= 2;
          q[j].push_back(it->first);
          j = (j + 1) % k;
          q[j].push_back(it->first);
          j = (j + 1) % k;
        }
      }
    }
    for (__typeof((m).begin()) it = (m).begin(); it != (m).end(); it++) {
      while (it->second) {
        it->second -= 2;
        q[j].push_front(it->first);
        q[j].push_back(it->first);
        j = (j + 1) % k;
      }
    }
    for (int i = (int)(0); i < (int)(k); i++)
      while (q[i].size()) {
        s[i] += q[i].front();
        q[i].pop_front();
      }
    pr(k);
    PR(s, k);
    return;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  Main();
  return 0;
}