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>
#pragma GCC optimize("O3")
using namespace std;
int add(int a, int b) {
  long long x = a + b;
  if (x >= 1000000007) x -= 1000000007;
  if (x < 0) x += 1000000007;
  return x;
}
long long mul(long long a, long long b) { return (a * b) % 1000000007; }
long long pw(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % 1000000007;
    a = (a * a) % 1000000007;
    b >>= 1;
  }
  return ans;
}
int frq[202];
int n;
bool can(int pz) {
  if (pz % 2 == 0) {
    for (int i = 0; i <= 200; ++i)
      if (frq[i] % 2 == 1) return 0;
  } else {
    int imp = 0;
    for (int i = 0; i <= 200; ++i) imp += (frq[i] % 2);
    if (imp > n / pz) return 0;
    int dif = (n / pz) - imp;
    if (dif % 2 == 1) return 0;
  }
  return 1;
}
void solve(int ans) {
  if (ans % 2 == 0) {
    vector<char> v;
    for (int i = 0; i <= 200; ++i) {
      char xx = '0' + i;
      while (frq[i]) {
        v.push_back(xx);
        frq[i] -= 2;
        if (v.size() == ans / 2) {
          for (int j = 0; j < v.size(); ++j) cout << v[j];
          for (int j = v.size() - 1; j >= 0; --j) cout << v[j];
          cout << " ";
          v.clear();
        }
      }
    }
  } else {
    vector<char> v;
    vector<char> imp;
    for (int i = 0; i <= 200; ++i)
      if (frq[i] % 2 == 1) {
        char xx = '0' + i;
        imp.push_back(xx);
        --frq[i];
      }
    for (int i = 0; i <= 200; ++i)
      while (frq[i] && imp.size() < (n / ans)) {
        char xx = '0' + i;
        imp.push_back(xx);
        imp.push_back(xx);
        frq[i] -= 2;
      }
    for (int i = 0; i <= 200; ++i) {
      char xx = '0' + i;
      while (frq[i]) {
        v.push_back(xx);
        frq[i] -= 2;
        if (v.size() == ans / 2) {
          for (int j = 0; j < v.size(); ++j) cout << v[j];
          cout << imp.back();
          for (int j = v.size() - 1; j >= 0; --j) cout << v[j];
          cout << " ";
          v.clear();
          imp.pop_back();
        }
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> n;
  cin >> s;
  for (int i = 0; i < n; ++i) frq[s[i] - '0']++;
  int ans = 0;
  for (int i = n; i >= 1; --i) {
    if (n % i == 0 && can(i)) {
      ans = i;
      break;
    }
  }
  cout << n / ans << '\n';
  if (ans != 1)
    solve(ans);
  else
    for (int i = 0; i < n; ++i) cout << s[i] << " ";
  return 0;
}