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 N = 1e6 + 1;
const int mod = 1e9 + 7;
inline int read() {
  char c = getchar();
  int t = 0, f = 1;
  while (!isdigit(c)) f = (c == '-') ? -1 : 1, c = getchar();
  while (isdigit(c)) t = t * 10 + c - 48, c = getchar();
  return t * f;
}
int cnt[N], cnt1[N], n;
void can(int len) {
  int c = 0, d = n / len;
  for (int i = 0; i < 256; i++) {
    cnt1[i] = 0;
    if (cnt[i] & 1) {
      c++;
    }
  }
  if (len & 1) {
    if (c > d) return;
  } else {
    if (c != 0) return;
  }
  if (len == 1) {
    cout << n << "\n";
    for (int i = 0; i < 256; i++) {
      for (int j = 0; j < cnt[i]; j++) {
        putchar((char)i);
        putchar(' ');
      }
    }
    exit(0);
  }
  vector<string> v;
  vector<char> b;
  string r = "";
  bool ok = 0;
  for (int i = 0; i < 256; i++) {
    for (int j = 0; j < cnt[i] / 2; j++) {
      r += i;
      cnt1[i] += 2;
      if ((int)r.size() == len / 2) {
        v.push_back(r);
        r = "";
      }
      if ((int)v.size() == d) {
        ok = 1;
        break;
      }
    }
    if (ok) break;
  }
  cout << d << "\n";
  if (len & 1) {
    for (int i = 255; i >= 0; i--) {
      for (int j = 1; j <= cnt[i] - cnt1[i]; j++) {
        b.push_back(char(i));
      }
    }
  }
  for (int i = 0; i < d; i++) {
    if (len != 1) {
      for (char f : v[i]) putchar(f);
    }
    if (len & 1) putchar(b[i]);
    if (len != 1) {
      for (int f = (int)v[i].size() - 1; f >= 0; f--) putchar(v[i][f]);
    }
    putchar(' ');
  }
  exit(0);
}
void solve() {
  n = read();
  for (int i = 1; i <= n; i++) cnt[getchar()]++;
  for (int i = n; i >= 1; i--) {
    if (n % i == 0) can(i);
  }
}
int main() {
  srand(time(0));
  int t = 1;
  while (t--) {
    solve();
  }
}