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 read(vector<long long> &v) {
  for (int i = 0; i < v.size(); i++) cin >> v[i];
}
void print(vector<long long> v) {
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
}
long long n, m, a, b, temp, x, y;
string str;
set<long long> s;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int count[26] = {0};
  int counta[26] = {0};
  int digi[10] = {0};
  cin >> n;
  cin >> str;
  for (int i = 0; i < n; i++) {
    if (str[i] >= 'A' && str[i] <= 'Z')
      counta[str[i] - 'A']++;
    else if (str[i] >= 'a' && str[i] <= 'z')
      count[str[i] - 'a']++;
    else
      digi[str[i] - '0']++;
  }
  vector<int> divi;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      divi.push_back(i);
      if (n / i != i) divi.push_back(n / i);
    }
  }
  long long sum = 0;
  priority_queue<pair<int, char>> pq;
  for (int i = 0; i < 26; i++) {
    sum += count[i] / 2;
    sum += counta[i] / 2;
    if (i < 10) {
      sum += digi[i] / 2;
      pq.push({digi[i], '0' + i});
    }
    pq.push({count[i], 'a' + i});
    pq.push({counta[i], 'A' + i});
  }
  sort(divi.begin(), divi.end());
  long long mx = 0;
  for (auto x : divi) {
    long long req = (n / x) * (x / 2);
    if (req <= sum) mx = x;
  }
  x = mx;
  cout << n / x;
  cout << '\n';
  string s[n / x];
  for (int i = 0; i < n / x; i++) {
    s[i].resize(x);
    for (int j = 0; j < x / 2; j++) {
      pair<int, char> fr = pq.top();
      pq.pop();
      s[i][j] = s[i][x - 1 - j] = fr.second;
      pq.push({fr.first - 2, fr.second});
    }
  }
  if (x % 2 == 1) {
    for (int i = 0; i < n / x; i++) {
      int j = x / 2;
      pair<int, char> fr = pq.top();
      pq.pop();
      s[i][j] = fr.second;
      pq.push({fr.first - 1, fr.second});
    }
  }
  for (int i = 0; i < n / x; i++) {
    cout << s[i] << ' ';
  }
}