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;
long long power(long long a, long long b) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret = (ret * a);
    b /= 2;
    a = (a * a);
  }
  return ret;
}
int isprime[400003 + 5];
void sieve() {
  for (int i = 2; i < 400003; ++i) {
    if (isprime[i] == 0) {
      for (int j = 2; i * j < 400003; ++j) {
        isprime[i * j] = 1;
      }
    }
  }
}
map<char, int> a;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  n = s.size();
  vector<int> v;
  int tm = n;
  for (int i = n; i >= 1; --i) {
    if (n % i == 0) {
      v.push_back(i);
    }
  }
  for (int i = 0; i < s.size(); ++i) {
    a[s[i]]++;
  }
  int cto = 0;
  int cte = 0;
  for (auto &it : a) {
    if (it.second) {
      if (it.second & 1)
        cto++;
      else
        cte++;
    }
  }
  int flag = 0;
  for (auto it : v) {
    if (it & 1) {
      if (cto <= (n / it)) {
        flag = it;
        break;
      }
    } else {
      if (cto == 0) {
        flag = it;
        break;
      }
    }
  }
  cout << (n / flag) << endl;
  if (flag % 2 == 1) {
    if (flag == 1) {
      for (int i = 0; i < n; i++) {
        cout << s[i] << " ";
      }
      return 0;
    }
    for (int t = 0; t < (n / flag); t++) {
      string v1;
      for (int i = 0; i < flag; ++i) {
        v1.push_back('.');
      }
      int cnt = flag, l = 0, r = flag - 1;
      for (auto &it : a) {
        if (it.second % 2 == 1 && cnt % 2 == 1 && it.second > 0) {
          v1[flag / 2] = (it.first);
          cnt--;
          it.second--;
        }
        if (cnt > 1) {
          while (cnt >= 2 && it.second >= 2) {
            v1[l++] = it.first;
            v1[r--] = it.first;
            cnt -= 2;
            it.second -= 2;
          }
        }
      }
      for (auto &it : a) {
        if ((l == r) && (it.second > 0) && cnt > 0) {
          v1[flag / 2] = it.first;
          it.second--;
          cnt--;
        }
      }
      cout << v1 << " ";
    }
    return 0;
  }
  for (int t = 0; t < (n / flag); t++) {
    string v1;
    for (int i = 0; i < flag; ++i) {
      v1.push_back(' ');
    }
    int cnt = flag, l = 0, r = flag - 1;
    for (auto &it : a) {
      if (it.second % 2 == 0 && cnt > 1) {
        while (cnt - 2 >= 0 && it.second - 2 >= 0) {
          v1[l++] = it.first;
          v1[r--] = it.first;
          cnt -= 2;
          it.second -= 2;
        }
      }
    }
    cout << v1 << " ";
  }
  return 0;
}