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 T>
void UniqeVector(vector<T>& v) {
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), end(v));
}
template <class A>
void re(complex<A>& c);
template <class A, class B>
void re(pair<A, B>& p);
template <class A>
void re(vector<A>& v);
template <class A, size_t SZ>
void re(array<A, SZ>& a);
template <class T>
void re(T& x) {
  cin >> x;
}
void re(double& d) {
  string t;
  re(t);
  d = stod(t);
}
void re(long double& d) {
  string t;
  re(t);
  d = stold(t);
}
template <class H, class... T>
void re(H& h, T&... t) {
  re(h);
  re(t...);
}
template <class A>
void re(complex<A>& c) {
  A a, b;
  re(a, b);
  c = {a, b};
}
template <class A, class B>
void re(pair<A, B>& p) {
  re(p.f, p.s);
}
template <class A>
void re(vector<A>& x) {
  for (auto& a : x) re(a);
}
template <class A, size_t SZ>
void re(array<A, SZ>& x) {
  for (auto& a : x) re(a);
}
string to_string(char c) { return string(1, c); }
string to_string(const char* s) { return (string)s; }
string to_string(string s) { return s; }
string to_string(bool b) { return to_string((int)b); }
template <class A>
string to_string(complex<A> c) {
  stringstream ss;
  ss << c;
  return ss.str();
}
string to_string(vector<bool> v) {
  string res = "{";
  for (int i = (0); ((1) > 0 ? i < ((int)v.size()) : i > ((int)v.size()));
       i += (1))
    res += char('0' + v[i]);
  res += "}";
  return res;
}
template <size_t SZ>
string to_string(bitset<SZ> b) {
  string res = "";
  for (int i = (0); ((1) > 0 ? i < (SZ) : i > (SZ)); i += (1))
    res += char('0' + b[i]);
  return res;
}
template <class A, class B>
string to_string(pair<A, B> p);
template <class T>
string to_string(T v) {
  bool fst = 1;
  string res = "";
  for (const auto& x : v) {
    if (!fst) res += " ";
    fst = 0;
    res += to_string(x);
  }
  return res;
}
template <class A, class B>
string to_string(pair<A, B> p) {
  return to_string(p.f) + " " + to_string(p.s);
}
template <class A>
void pr(A x) {
  cout << to_string(x);
}
template <class H, class... T>
void pr(const H& h, const T&... t) {
  pr(h);
  pr(t...);
}
void ps() { pr("\n"); }
template <class H, class... T>
void ps(const H& h, const T&... t) {
  pr(h);
  if (sizeof...(t)) pr(" ");
  ps(t...);
}
void prsz(vector<int>& v) {
  pr((int)v.size(), '\n');
  pr(v);
}
const int di[8] = {0, 0, 1, -1, 1, 1, -1, -1};
const int dj[8] = {1, -1, 0, 0, 1, -1, 1, -1};
const int SZ = 26 * 2 + 10;
vector<int> cnt(SZ);
int n;
string s;
void add(char c) {
  if (isdigit(c)) cnt[c - '0']++;
  if (isupper(c)) cnt[c - 'A' + 10]++;
  if (islower(c)) cnt[c - 'a' + 36]++;
}
char to_char(int c) {
  if (c < 10) return char('0' + c);
  c -= 10;
  if (c < 26) return char('A' + c);
  c -= 26;
  return char('a' + c);
}
void Try(int siz) {
  vector<int> cnt2 = cnt;
  string middle = "";
  if (siz & 1) {
    for (int i = (0); ((1) > 0 ? i < (SZ) : i > (SZ)); i += (1)) {
      if (cnt2[i] & 1) {
        middle += to_char(i);
        cnt2[i]--;
      }
    }
    if ((int)middle.size() > n / siz) return;
    if ((int)middle.size() < n / siz) {
      for (int i = (0); ((1) > 0 ? i < (SZ) : i > (SZ)); i += (1)) {
        int dif = n / siz - (int)middle.size();
        if (dif <= 0) break;
        int need = min(cnt2[i], dif);
        cnt2[i] -= need;
        middle += string(need, to_char(i));
      }
    }
    if ((int)middle.size() > n / siz) return;
  }
  string to_add = "";
  for (int i = (0); ((1) > 0 ? i < (SZ) : i > (SZ)); i += (1)) {
    if (cnt2[i] & 1) return;
    to_add += string(cnt2[i] / 2, to_char(i));
  }
  ps(n / siz);
  int i = 0, j = 0;
  for (int k = (0); ((1) > 0 ? k < (n / siz) : k > (n / siz)); k += (1)) {
    string ans(siz, '?');
    for (int t = (0); ((1) > 0 ? t < (siz / 2) : t > (siz / 2)); t += (1)) {
      ans[t] = ans[siz - t - 1] = to_add[i];
      ++i;
    }
    if (siz & 1) {
      ans[siz / 2] = middle[j];
      ++j;
    }
    pr(ans, ' ');
  }
  exit(0);
}
vector<int> divisors(int x) {
  vector<int> ans;
  int sq = sqrt(x);
  for (int i = 1; i <= sq; ++i) {
    if (!(x % i)) {
      if (i * i == x)
        ans.push_back(i);
      else
        ans.push_back(i), ans.push_back(x / i);
    }
  }
  return ans;
}
void Suhaib_Sawalha() {
  re(n, s);
  for (auto& x : s) add(x);
  vector<int> d = divisors(n);
  sort(d.rbegin(), d.rend());
  for (auto& x : d) Try(x);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  Suhaib_Sawalha();
  return 0;
}