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 SIZE_N = 400000 + 10;
int n;
char str[SIZE_N];
int cnt[200];
int co, ce;
vector<vector<pair<char, int> > > ans;
void push(char c, int i) {
  vector<pair<char, int> > temp;
  temp.push_back(pair<char, int>(c, i));
  ans.push_back(temp);
}
inline void push(int i, char c, int am) {
  while (int((ans).size()) <= i) {
    ans.push_back(vector<pair<char, int> >());
  }
  ans[i].push_back(pair<char, int>(c, am));
}
void part(int k, int len) {
  for (int c = (0); c <= (int(200) - 1); ++c) {
    if ((cnt[c] % 2) == 1) {
      cnt[c]--;
      push(c, 1);
    }
  }
  int koc = k - co;
  for (int c = (0); c <= (int(200) - 1); ++c) {
    if (cnt[c] == 0) continue;
    if ((cnt[c] % 2) == 0) {
      while (cnt[c] != 0 && koc != 0) {
        --cnt[c], --koc;
        push(c, 1);
      }
    }
  }
  for (int i = (0); i <= (int(k) - 1); ++i) {
    int togo = len - 1;
    while (togo != 0) {
      for (int c = (0); c <= (int(200) - 1); ++c) {
        if (cnt[c] == 0) continue;
        int am = min(togo, cnt[c]);
        push(i, c, am);
        cnt[c] -= am;
        togo -= am;
        if (togo == 0) break;
      }
    }
  }
}
void show(int k) {
  printf("%d\n", k);
  for (int i = (0); i <= (int(k) - 1); ++i) {
    for (int j = (int((ans[i]).size()) - 1); j >= (1); --j) {
      for (int h = (0); h <= (int(ans[i][j].second >> 1) - 1); ++h)
        printf("%c", ans[i][j].first);
    }
    for (int h = (0); h <= (int(ans[i][0].second) - 1); ++h)
      printf("%c", ans[i][0].first);
    for (int j = (1); j <= (int((ans[i]).size()) - 1); ++j) {
      for (int h = (0); h <= (int(ans[i][j].second >> 1) - 1); ++h)
        printf("%c", ans[i][j].first);
    }
    printf(" ");
  }
}
int main() {
  scanf("%d", &n);
  scanf("%s", str);
  for (int i = (0); i <= (int(n) - 1); ++i) {
    cnt[str[i]]++;
  }
  for (int c = (0); c <= (int(200) - 1); ++c) {
    if (cnt[c] == 0) continue;
    if (cnt[c] & 1)
      ++co;
    else
      ++ce;
  }
  if (co == 0) {
    for (int c = (0); c <= (int(200) - 1); ++c) {
      if (cnt[c] == 0) continue;
      push(0, c, cnt[c]);
    }
    show(1);
  } else if (co == 1) {
    for (int c = (0); c <= (int(200) - 1); ++c) {
      if (cnt[c] & 1) {
        push(0, c, 1);
        cnt[c]--;
      }
    }
    for (int c = (0); c <= (int(200) - 1); ++c) {
      if (cnt[c] == 0) continue;
      push(0, c, cnt[c]);
    }
    show(1);
  } else {
    for (int k = (co); k <= (n); ++k) {
      if ((n % k) != 0) continue;
      if ((k - co) % 2 == 1) continue;
      if (((n / k) % 2) == 0) continue;
      part(k, n / k);
      show(k);
      break;
    }
  }
  return 0;
}