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>
T gcd(T a, T b) {
  while (a != 0) {
    T temp = a;
    a = b % a;
    b = temp;
  }
  return b;
}
template <class T>
T egcd(T a, T b, T &x, T &y) {
  T gcd, xt, yt;
  if (a == 0) {
    gcd = b;
    x = 0, y = 1;
  } else {
    gcd = egcd(b % a, a, xt, yt);
    x = yt - (b / a) * xt;
    y = xt;
  }
  return gcd;
}
template <class T>
T expo(T base, T exp, T mod) {
  T res = 1;
  base = base % mod;
  while (exp > 0) {
    if (exp & 1) res = (res * base) % mod;
    exp = exp >> 1;
    base = (base * base) % mod;
  }
  return res;
}
template <class T>
T modinv(T a, T mod) {
  T x, y;
  egcd<T>(a, mod, x, y);
  while (x < 0) x += mod;
  while (x >= mod) x -= mod;
  return x;
}
template <class T>
T modinvfermat(T a, T mod) {
  return expo<T>(a, mod - 2, mod);
}
template <class T>
bool rev(T a, T b) {
  return a > b;
}
template <class T>
long long maxpower(T a, T b) {
  long long ans = 0;
  while (a > 0 && a % b == 0) {
    ans++;
    a /= b;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  string s;
  cin >> s;
  map<char, long long> m;
  for (long long i = 0; i < n; i++) {
    if (m.find(s[i]) == m.end()) {
      m[s[i]] = 1;
    } else
      m[s[i]]++;
  }
  vector<pair<char, long long>> odd, even;
  for (auto i = m.begin(); i != m.end(); i++) {
    auto t = *i;
    if (t.second % 2 == 0)
      even.push_back(make_pair(t.first, t.second));
    else
      odd.push_back(make_pair(t.first, t.second));
  }
  if (odd.size() == 0) {
    string ans = "";
    for (long long i = 0; i < even.size(); i++) {
      for (long long j = 0; j < even[i].second / 2; j++) {
        ans += even[i].first;
      }
    }
    string r = ans;
    reverse(r.begin(), r.end());
    cout << 1 << endl;
    cout << ans + r;
    return 0;
  }
  long long si, nos;
  for (long long i = odd.size(); i < n + 1; i++) {
    if (n % i == 0) {
      if ((n / i) % 2 == 1) {
        si = n / i;
        nos = i;
        break;
      }
    }
  }
  long long curodd = 0, cureven = 0;
  string temp[nos];
  long long curpos = nos;
  for (long long i = 0; i < nos; i++) {
    if (curodd < odd.size()) {
      temp[i] = string(1, odd[curodd].first);
      odd[curodd].second--;
      even.push_back(odd[curodd]);
      curodd++;
    } else {
      curpos = i;
      break;
    }
  }
  for (long long i = curpos; i < nos; i++) {
    while (cureven < even.size() && even[cureven].second == 0) cureven++;
    if (cureven < even.size() && even[cureven].second > 0) {
      temp[i] = string(1, even[cureven].first);
      i++;
      temp[i] = string(1, even[cureven].first);
      even[cureven].second -= 2;
      while (cureven < even.size() && even[cureven].second == 0) cureven++;
    }
  }
  cureven = 0;
  for (long long i = 0; i < even.size(); i++) {
    cerr << even[i].first << " " << even[i].second << "\n";
  }
  for (long long i = 0; i < nos; i++) {
    string app = "";
    for (long long j = 0; j < (si - 1) / 2; j++) {
      while (cureven < even.size() && even[cureven].second == 0) cureven++;
      if (cureven < even.size()) {
        app += even[cureven].first;
        even[cureven].second -= 2;
      }
      if (even[cureven].second == 0) cureven++;
    }
    string r = app;
    reverse(r.begin(), r.end());
    temp[i] = app + temp[i] + r;
  }
  cout << nos << endl;
  for (auto i = 0; i < nos; i++) cout << temp[i] << " ";
}