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>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const long long inf = numeric_limits<long long>::max() / 2;
const long double eps = 1e-9;
const long double pi = acosl(-1);
template <typename T>
inline bool mineq(T& a, T b) {
  return (a > b) ? (a = b, 1) : 0;
}
template <typename T>
inline bool maxeq(T& a, T b) {
  return (a < b) ? (a = b, 1) : 0;
}
inline void solve(), read();
const string file = "";
signed main() {
  if (file != "") {
    freopen((file + ".in").c_str(), "r", stdin);
    freopen((file + ".out").c_str(), "w", stdout);
  }
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  read();
  solve();
  return 0;
}
const long long MAXS = 256;
long long n;
string s;
vector<long long> cnt(MAXS);
vector<string> ans;
long long gcd(long long a, long long b) {
  while (b != 0) {
    a %= b;
    swap(a, b);
  }
  return a;
}
long long check(long long num, vector<long long> cnt) {
  ans.clear();
  long long len = n / num;
  ans.resize(num);
  long long j = 0;
  long long was = 0;
  for (long long i = 0; i < MAXS; i++) {
    if (cnt[i] % 2 == 1) {
      was = 1;
      if (j == num) {
        return 0;
      }
      ans[j++].push_back(i);
      --cnt[i];
    }
  }
  if (was) {
    for (long long i = 0; i < MAXS; i++) {
      if (j == num) {
        break;
      }
      while (j < (long long)((ans).size()) && cnt[i]) {
        ans[j++].push_back(i);
        --cnt[i];
      }
    }
  }
  long long tot = 0;
  for (long long i = 0; i < MAXS; i++) {
    tot += cnt[i];
    if (cnt[i] % 2 == 1) {
      return 0;
    }
  }
  if (tot % num != 0) {
    return 0;
  }
  j = 0;
  for (long long i = 0; i < MAXS; i++) {
    if (cnt[i] && cnt[i] % 2 == 0) {
      if ((long long)((ans[j]).size()) == len) {
        ++j;
      }
      ans[j].push_back(i);
      ans[j].push_back(i);
      cnt[i] -= 2;
      --i;
    }
  }
  return j == num - 1;
}
void palindrome(string& s) {
  vector<long long> cnt(MAXS, 0);
  for (long long i = 0; i < (long long)((s).size()); i++) {
    ++cnt[s[i]];
  }
  long long l = 0, r = (long long)((s).size()) - 1;
  s.resize((long long)((s).size()), '0');
  for (long long i = 0; i < MAXS; i++) {
    if (cnt[i] && cnt[i] % 2 == 0) {
      s[l++] = s[r--] = i;
      cnt[i] -= 2;
      --i;
    } else if (cnt[i] % 2 == 1) {
      s[(long long)((s).size()) / 2] = i;
      --cnt[i];
      --i;
    }
  }
}
inline void solve() {
  vector<long long> ds;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ds.push_back(i);
      ds.push_back(n / i);
    }
  }
  sort((ds).begin(), (ds).end());
  ds.resize(unique((ds).begin(), (ds).end()) - ds.begin());
  for (long long x : ds) {
    if (check(x, cnt)) {
      break;
    }
  }
  cout << (long long)((ans).size()) << "\n";
  for (string& s : ans) {
    palindrome(s);
    cout << s << " ";
  }
}
inline void read() {
  cin >> n;
  cin >> s;
  for (long long i = 0; i < n; i++) {
    ++cnt[s[i]];
  }
}