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;
int n;
int arr[77];
long long pr;
char c[4 * 100000 + 100];
vector<char> t;
vector<int> ix;
string word, k;
char ch(int i) {
  char a;
  if (i < 26)
    a = 'a' + i;
  else if (i >= 26 && i < 36)
    a = '0' + i - 26;
  else
    a = 'A' + i - 36;
  return a;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    char a;
    cin >> a;
    c[i] = a;
    if (a >= 'a' && a <= 'z')
      arr[a - 'a']++;
    else if (a >= '0' && a <= '9')
      arr[a - '0' + 26]++;
    else
      arr[a - 'A' + 36]++;
    k += a;
  }
  for (int i = 0; i < 62; i++) {
    if (arr[i] != 0) ix.push_back(i);
    if (arr[i] % 2 != 0) {
      char a = ch(i);
      t.push_back(a);
      arr[i]--;
    }
    pr += arr[i];
  }
  if (t.size() == 0) {
    cout << 1 << endl;
    string s = "";
    for (int g = 0; g < ix.size(); ++g) {
      char a = ch(ix[g]);
      string ss = "";
      while (arr[ix[g]] > 0) {
        ss += a;
        arr[ix[g]] -= 2;
      }
      s += ss;
    }
    string tt = s;
    reverse(tt.begin(), tt.end());
    cout << (s + tt);
    return 0;
  }
  pr /= 2;
  long long l = 0;
  while (pr >= t.size() && pr % t.size() != 0) {
    for (l; l < ix.size(); l++) {
      if (arr[ix[l]] != 0) {
        char a = ch(ix[l]);
        t.push_back(a);
        t.push_back(a);
        arr[ix[l]] -= 2;
        pr -= 1;
        break;
      }
    }
  }
  for (long long g = 0; g < ix.size(); g++) {
    char a = ch(ix[g]);
    string ss = "";
    while (arr[ix[g]] > 0) {
      ss += a;
      arr[ix[g]] -= 2;
    }
    word += ss;
  }
  string tt = word;
  reverse(tt.begin(), tt.end());
  word = word + tt;
  if (n % t.size() == 0 && pr % t.size() == 0) {
    cout << t.size() << endl;
    for (long long i = 0; i < t.size(); i++) {
      int k = n / t.size() - 1;
      k /= 2;
      string q = "";
      q += word.substr(k * i, k);
      reverse(q.begin(), q.end());
      string tt = q;
      reverse(tt.begin(), tt.end());
      q = q + t[i] + tt;
      cout << q << ' ';
    }
  } else {
    cout << n << '\n';
    for (int i = 0; i < n; ++i) cout << c[i] << ' ';
    return 0;
  }
  return 0;
}