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 <typename T, typename S>
ostream &operator<<(ostream &os, const pair<T, S> &v) {
  os << "(";
  os << v.first << "," << v.second << ")";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  os << "[";
  long long sz = v.size();
  for (long long i = 0; i < sz; ++i) {
    os << v[i];
    if (i != sz - 1) os << ",";
  }
  os << "]\n";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const set<T> &v) {
  T last = *v.rbegin();
  os << "[";
  for (auto it : v) {
    os << it;
    if (it != last) os << ",";
  }
  os << "]\n";
  return os;
}
template <typename T, typename S>
ostream &operator<<(ostream &os, const map<T, S> &v) {
  for (auto it : v) {
    os << it.first << " : " << it.second << "\n";
  }
  return os;
}
long long power(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b % 2) {
      res = (res * a) % 1000000007;
    }
    b /= 2;
    a = (a * a) % 1000000007;
  }
  return res;
}
template <typename Arg1>
void __f(const char *name, Arg1 &&arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&arg1, Args &&...args) {
  const char *comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const long long N = 4e5 + 5;
char center[N];
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  string s;
  cin >> s;
  map<long long, long long> cnt;
  for (auto c : s) ++cnt[c];
  vector<char> odd, arr;
  for (auto &it : cnt) {
    if (it.second % 2) {
      odd.push_back(it.first);
      for (__typeof(1) i = 1; i <= it.second - 1; i++) arr.push_back(it.first);
      it.second = 1;
    } else {
      for (__typeof(1) i = 1; i <= it.second; i++) arr.push_back(it.first);
    }
  }
  long long idx = 0;
  for (__typeof(1) num = 1; num <= n; num++) {
    if (n % num == 0) {
      long long len = n / num;
      if (len & 1) {
        if (num < (long long)odd.size()) continue;
        cout << num << "\n";
        long long sz = odd.size();
        idx = 0;
        for (__typeof(1) i = 1; i <= sz; i++) {
          center[i] = odd[i - 1];
        }
        for (__typeof(sz + 1) i = sz + 1; i <= num; i++) {
          center[i] = arr[idx++];
        }
        for (__typeof(1) i = 1; i <= num; i++) {
          string pal;
          for (__typeof(1) j = 1; j <= len / 2; j++) {
            pal += arr[idx];
            idx += 2;
          }
          cout << pal;
          cout << center[i];
          reverse((pal).begin(), (pal).end());
          cout << pal << " ";
        }
        return 0;
      } else {
        if (!odd.empty()) continue;
        idx = 0;
        cout << num << "\n";
        for (__typeof(1) i = 1; i <= num; i++) {
          string pal;
          for (__typeof(1) j = 1; j <= len / 2; j++) {
            pal += arr[idx];
            idx += 2;
          }
          cout << pal;
          reverse((pal).begin(), (pal).end());
          cout << pal << " ";
        }
        return 0;
      }
    }
  }
  return 0;
}