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;
void itval(istream_iterator<string> it) {}
template <typename T, typename... Args>
void itval(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  itval(++it, args...);
}
const long long int MOD = 1e9 + 7;
template <typename T>
inline void print(T x) {
  cout << x << "\n";
}
template <typename T>
inline void printvec(T x) {
  for (auto a : x) cout << a << ' ';
  cout << '\n';
}
struct custom {
  bool operator()(const pair<int, int> &p1, const pair<int, int> &p2) const {
    if (p1.second == p2.second) return p1.first < p2.first;
    return p1.second < p2.second;
  }
};
long long int get_pow(long long int a, long long int b) {
  long long int res = 1;
  while (b) {
    if (b & 1) res = (res * a) % MOD;
    a = (a * a) % MOD;
    b >>= 1;
  }
  return res;
}
const long long int N = 2e5 + 5, inf = 1e18;
void solve() {
  int n;
  string s;
  cin >> n >> s;
  map<char, long long int> mp;
  for (auto c : s) mp[c]++;
  long long int prs = 0, parts = n;
  for (auto p : mp) prs += p.second / 2;
  for (long long int i = (long long int)1; i < (long long int)(sqrt(n) + 1);
       i++) {
    if (n % i == 0) {
      long long int len = n / i;
      long long int want = len / 2 * i;
      if (want <= prs) {
        parts = min(parts, i);
      }
      len = i;
      want = (len / 2) * (n / i);
      if (want <= prs) {
        parts = min(parts, n / i);
      }
    }
  }
  long long int len = n / parts;
  long long int want = len / 2 * parts;
  deque<char> a, b, c;
  for (auto p : mp) {
    for (long long int i = (long long int)0; i < (long long int)(p.second / 2);
         i++) {
      a.push_back(p.first);
      b.push_back(p.first);
    }
    if (p.second & 1) c.push_back(p.first);
  }
  while (a.size() > want) {
    c.push_back(a.back());
    c.push_back(b.back());
    a.pop_back();
    b.pop_back();
  }
  cout << parts << '\n';
  for (long long int i = (long long int)0; i < (long long int)(parts); i++) {
    deque<char> have;
    if (len % 2) {
      have.push_back(c.front());
      c.pop_front();
    }
    for (long long int i = (long long int)0; i < (long long int)(len / 2);
         i++) {
      have.push_back(b.front());
      b.pop_front();
      have.push_front(a.front());
      a.pop_front();
    }
    for (long long int i = (long long int)0; i < (long long int)(len); i++) {
      cout << have[i];
    }
    cout << ' ';
  }
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int test = 1;
  clock_t z = clock();
  for (long long int tes = (long long int)0; tes < (long long int)(test);
       tes++) {
    solve();
  }
  fprintf(stderr, "Total Time:%.4f\n", (double)(clock() - z) / CLOCKS_PER_SEC),
      fflush(stderr);
  return 0;
}