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;
using namespace std::chrono;
template <typename A>
ostream &operator<<(ostream &cout, vector<A> const &v);
template <typename A, typename B>
ostream &operator<<(ostream &cout, pair<A, B> const &p) {
  return cout << "(" << p.first << ", " << p.second << ")";
}
template <typename A>
ostream &operator<<(ostream &cout, vector<A> const &v) {
  cout << "[";
  for (int i = 0; i < v.size(); i++) {
    if (i) cout << ", ";
    cout << v[i];
  }
  return cout << "]";
}
template <typename A, typename B>
istream &operator>>(istream &cin, pair<A, B> &p) {
  cin >> p.first;
  return cin >> p.second;
}
mt19937 rng(steady_clock::now().time_since_epoch().count());
void usaco(string filename) {
  freopen((filename + ".in").c_str(), "r", stdin);
  freopen((filename + ".out").c_str(), "w", stdout);
}
const long double pi = 3.14159265358979323846;
long long n, m, k, q, l, r, x, y, z;
long long a[1000005];
long long b[1000005];
long long c[1000005];
string second, t;
long long ans = 0;
long long cn[300];
string ss[400005];
void solve(int tc) {
  cin >> n >> second;
  memset(cn, 0, sizeof(cn));
  for (long long i = 0; i < (n); ++i) ++cn[second[i]];
  int nodd = 0;
  for (long long i = 0; i < (300); ++i) nodd += cn[i] & 1;
  for (long long m = (n); m >= (1); --m) {
    if (n % m == 0) {
      int k = n / m;
      if (m & 1) {
        if (nodd <= k && (nodd & 1) == (k & 1)) {
          int p = m / 2;
          for (long long i = 0; i < (k); ++i) ss[i] = string(m, '0');
          int pt = 0;
          for (long long i = 0; i < (k); ++i) {
            if (nodd > 0) {
              while (pt < 300 && (cn[pt] & 1) == 0) ++pt;
            } else {
              while (pt < 300 && cn[pt] == 0) ++pt;
            }
            ss[i][p] = pt;
            --cn[pt];
            if (nodd == 1) pt = 0;
            --nodd;
          }
          cout << k << '\n';
          pt = 0;
          for (long long i = 0; i < (k); ++i) {
            for (long long j = 0; j < (m / 2); ++j) {
              while (pt < 300 && cn[pt] == 0) ++pt;
              ss[i][j] = ss[i][m - 1 - j] = pt;
              cn[pt] -= 2;
            }
            cout << ss[i] << " ";
          }
          return;
        }
      } else {
        if (nodd == 0) {
          for (long long i = 0; i < (k); ++i) ss[i] = string(m, '0');
          int pt = 0;
          cout << k << '\n';
          for (long long i = 0; i < (k); ++i) {
            for (long long j = 0; j < (m / 2); ++j) {
              while (pt < 300 && cn[pt] == 0) ++pt;
              ss[i][j] = ss[i][m - 1 - j] = pt;
              cn[pt] -= 2;
            }
            cout << ss[i] << " ";
          }
          return;
        }
      }
    }
  }
}
int main() {
  { ios_base::sync_with_stdio(false); }
  {
    cin.tie(NULL);
    cout.tie(NULL);
  }
  int tc;
  tc = 1;
  for (int t = 0; t < tc; t++) solve(t);
}