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;
const int MAX(4e5 + 2);
map<char, long long int> freq;
long long int single, committed, ans;
vector<string> finalAnswer;
vector<char> oddChars, evenChars;
long long int n;
void makePallindrome(long long int length) {
  for (int i(0); i < n / length; i++) {
    string tempString(length, 'x');
    if (oddChars.size() > 0) {
      tempString[length / 2] = oddChars.back();
      if (freq[oddChars.back()] > 1) {
        evenChars.push_back(oddChars.back());
      }
      freq[oddChars.back()]--;
      oddChars.pop_back();
    } else {
      tempString[length / 2] = evenChars.back();
      freq[evenChars.back()]--;
      oddChars.push_back(evenChars.back());
      evenChars.pop_back();
    }
    long long int maxIter(1);
    while (length / 2 + maxIter < length) {
      if (evenChars.size() > 0) {
        tempString[length / 2 + maxIter] = evenChars.back();
        tempString[length / 2 - maxIter] = evenChars.back();
        freq[evenChars.back()] -= 2;
        if (freq[evenChars.back()] == 0) {
          evenChars.pop_back();
        }
      } else {
        for (int j(0); j < oddChars.size(); j++) {
          if (freq[oddChars[j]] >= 2) {
            tempString[length / 2 + maxIter] = oddChars[j];
            tempString[length / 2 - maxIter] = oddChars[j];
            freq[oddChars[j]] -= 2;
            if (freq[oddChars[j]] == 0) {
              oddChars.erase(oddChars.begin() + j);
            }
          }
        }
      }
      maxIter++;
    }
    finalAnswer.push_back(tempString);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s, a;
  cin >> n;
  cin >> s;
  for (auto x : s) {
    freq[x]++;
  }
  long long int countOdd(0);
  for (auto x : freq) {
    countOdd += x.second & 1;
    if (x.second & 1) {
      oddChars.push_back(x.first);
    } else {
      evenChars.push_back(x.first);
    }
  }
  if (countOdd <= 1) {
    cout << 1 << endl;
    if (s.length() & 1) {
      makePallindrome(n);
      cout << finalAnswer[0] << endl;
    } else {
      string tempString(n, 'x');
      for (int i(0); i < n / 2; i++) {
        tempString[n - i - 1] = evenChars.back();
        tempString[i] = evenChars.back();
        freq[evenChars.back()] -= 2;
        if (freq[evenChars.back()] == 0) {
          evenChars.pop_back();
        }
      }
      cout << tempString << endl;
    }
    return 0;
  }
  single = countOdd;
  committed = (n - single) / 2;
  ans = 1;
  for (long long int size(countOdd); size <= n; size++) {
    if (n % size == 0) {
      long long int length(n / size);
      if (length & 1 and (length / 2) * size <= committed) {
        makePallindrome(n / size);
        break;
      }
    }
  }
  cout << finalAnswer.size() << endl;
  for (auto x : finalAnswer) {
    cout << x << " ";
  }
  return 0;
}