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 long double epsilon = 1e-9;
vector<int> getLetterCounts(const string& str) {
  vector<int> toRet(26 + 26 + 10);
  for (int i = 0; i < str.size(); i++) {
    if (str[i] >= 'a' && str[i] <= 'z') {
      toRet[str[i] - 'a']++;
    }
    if (str[i] >= 'A' && str[i] <= 'Z') {
      toRet[str[i] - 'A' + 26]++;
    }
    if (str[i] >= '0' && str[i] <= '9') {
      toRet[str[i] - '0' + 52]++;
    }
  }
  return toRet;
}
char decodeLetter(int n) {
  if (n < 26) return 'a' + n;
  if (n < 52) return 'A' + n - 26;
  return '0' + n - 52;
}
char tmp[1 << 19];
string decode(const vector<int>& cnts) {
  vector<int> counts(cnts);
  int k = 0;
  bool isOdd = false;
  for (int i = 0; i < counts.size(); i++) {
    if (counts[i] % 2) {
      tmp[k++] = decodeLetter(i);
      counts[i]--;
      isOdd = true;
      break;
    }
  }
  for (int i = 0; i < counts.size(); i++) {
    char c = decodeLetter(i);
    while (counts[i] > 0) {
      tmp[k++] = c;
      counts[i] -= 2;
    }
  }
  reverse(tmp, tmp + k);
  int j = k - 1;
  if (isOdd) j--;
  while (j >= 0) {
    tmp[k++] = tmp[j];
    j--;
  }
  tmp[k] = '\0';
  string res = tmp;
  return res;
}
int main() {
  int n;
  string str;
  cin >> n >> str;
  vector<int> counts = getLetterCounts(str);
  int numOdd = 0;
  for (int i = 0; i < counts.size(); i++) {
    numOdd += (counts[i] % 2);
  }
  vector<int> toProcess;
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      toProcess.push_back(i);
      toProcess.push_back(n / i);
    }
  }
  sort(toProcess.begin(), toProcess.end());
  for (int t = 0; t < toProcess.size(); t++) {
    int i = toProcess[t];
    if (n % i == 0) {
      if (i < numOdd) {
        continue;
      }
      int num = i;
      int per_each = n / i;
      if (per_each % 2 == 0 && numOdd > 0) {
        continue;
      }
      vector<vector<int> > splits(num);
      for (int j = 0; j < num; j++) {
        splits[j].resize(counts.size());
      }
      vector<int> sums(num);
      int k = 0;
      for (int j = 0; j < counts.size(); j++) {
        if (counts[j] % 2 == 1) {
          splits[k][j]++;
          sums[k]++;
          k++;
          counts[j]--;
        }
      }
      if (numOdd % 2 == 1) {
        while (k < num) {
          for (int j = 0; j < counts.size(); j++) {
            if (counts[j] > 0) {
              counts[j]--;
              sums[k]++;
              splits[k][j]++;
              k++;
              break;
            }
          }
        }
      }
      k = 0;
      for (int j = 0; j < num; j++) {
        while (sums[j] < per_each) {
          while (counts[k] == 0) {
            k++;
          }
          sums[j]++;
          counts[k]--;
          splits[j][k]++;
        }
      }
      cout << num << endl;
      bool first = true;
      for (int j = 0; j < num; j++) {
        if (!first) cout << " ";
        first = false;
        cout << decode(splits[j]);
      }
      cout << endl;
      return 0;
    }
  }
  return 0;
}