#include <bits/stdc++.h>
using namespace std;
const int oo = (int)1e9;
const int mod = (int)1e9 + 7;
const double PI = acos(-1.0);
const int MAX = 400009;
int n;
char s[MAX], ans[MAX];
int occ[250];
int main(int argc, char* argv[]) {
  scanf("%d", &n);
  scanf("%s", s);
  for (int i = 0; i < n; i++) occ[s[i]]++;
  int odd = 0;
  vector<char> a;
  for (int i = 0; i < 130; i++) {
    odd += (occ[i] & 1);
    if (occ[i] & 1) {
      a.push_back(i);
      --occ[i];
    }
  }
  for (int i = 0; i < 130; i++)
    while (occ[i]--) a.push_back(i);
  reverse((a).begin(), (a).end());
  for (int i = 0; i < n; i++) ans[i] = '*';
  for (int d = 1; d <= n; d++)
    if (n % d == 0 && d >= odd && (!odd || ((n / d) % 2 == 1))) {
      int nbr = d, len = n / d;
      for (int i = 0; i < nbr && odd; i++) {
        ans[len * i + len / 2] = a.back();
        a.pop_back();
      }
      cout << nbr << endl;
      for (int i = 0; i < nbr; i++)
        for (int j = 0; j < len / 2; j++) {
          ans[len * i + j] = a.back();
          a.pop_back();
          ans[len * i + len - 1 - j] = a.back();
          a.pop_back();
        }
      for (int i = 0; i < nbr; i++) {
        if (i) cout << " ";
        for (int j = 0; j < len; j++) cout << ans[i * len + j];
      }
      cout << endl;
      return 0;
    }
  return 0;
}
