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 C>
void mini(C &a4, C b4) {
  a4 = min(a4, b4);
}
template <class C>
void maxi(C &a4, C b4) {
  a4 = max(a4, b4);
}
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << "=" << h << "\n";
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << "=" << h << ",";
  _dbg(sdbg + 1, a...);
}
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  os << "[";
  for (auto vv : V) os << vv << ",";
  return os << "]";
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
int32_t main() {
  long long n;
  cin >> n;
  string s;
  cin >> s;
  map<char, long long> mapka;
  for (char c : s) {
    mapka[c]++;
  }
  vector<char> parzyste, nieparzyste;
  for (auto p : mapka) {
    if (p.second % 2 == 1) {
      nieparzyste.push_back(p.first);
    } else {
      parzyste.push_back(p.first);
    }
  }
  if (nieparzyste.empty()) {
    cout << "1\n";
    string t;
    for (auto p : mapka) {
      for (long long i = 0; i < p.second / 2; i++) t.push_back(p.first);
    }
    string r = t;
    reverse((r).begin(), (r).end());
    t += r;
    cout << t << "\n";
    return 0;
  }
  long long k = nieparzyste.size();
  long long l = parzyste.size();
  for (long long d = n / k; d >= 1; d--)
    if (n % d == 0 && d % 2 == 1) {
      if ((n / d - k) % 2 == 0) {
        vector<char> kubelki = nieparzyste;
        for (auto c : nieparzyste) mapka[c]--;
        while (kubelki.size() < n / d) {
          if (!parzyste.empty()) {
            kubelki.push_back(parzyste.back());
            mapka[parzyste.back()]--;
            if (mapka[parzyste.back()] == 0) parzyste.pop_back();
          } else {
            while (mapka[nieparzyste.back()] == 0) nieparzyste.pop_back();
            kubelki.push_back(nieparzyste.back());
            mapka[nieparzyste.back()]--;
          }
        }
        cout << kubelki.size() << "\n";
        vector<char> pozostale;
        merge(parzyste.begin(), parzyste.end(), nieparzyste.begin(),
              nieparzyste.end(), back_inserter(pozostale));
        for (auto c : kubelki) {
          string t;
          long long ile = (d - 1) / 2;
          for (long long _ = (0); _ <= ((long long)(ile)-1); _++) {
            while (mapka[pozostale.back()] == 0) pozostale.pop_back();
            t.push_back(pozostale.back());
            mapka[pozostale.back()] -= 2;
          }
          cout << t;
          cout << c;
          reverse((t).begin(), (t).end());
          cout << t;
          cout << " ";
        }
        break;
      }
    }
  cout << "\n";
}