#include <bits/stdc++.h>
using namespace std;
bool comp(const int a, const int b) { return a < b; }
bool RelativelyPrime(int a, int b) {
  return (a < b)    ? RelativelyPrime(b, a)
         : !(a % b) ? (b == 1)
                    : RelativelyPrime(b, a % b);
}
int ceil1(int a, int x) {
  int sum = a / x;
  if (a % x)
    return sum + 1;
  else
    return sum;
}
vector<pair<char, char>> a;
vector<char> b;
char c[500005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  sort(s.begin(), s.end());
  int j = 0, i = 0;
  while (i < n) {
    if (i != n - 1 && s[i] == s[i + 1]) {
      a.push_back({s[i], s[i + 1]});
      i = i + 2;
    } else {
      b.push_back(s[i]);
      i = i + 1;
    }
  }
  int l = b.size();
  j = a.size();
  if (l == 0) {
    cout << 1 << endl;
    for (int i = 0; i < j; i++) {
      c[i] = a[i].first;
      c[n - i - 1] = a[i].second;
    }
    cout << c;
    return 0;
  }
  while (j % l != 0 && j > 0) {
    j--;
    l += 2;
    b.push_back(a[j].first);
    b.push_back(a[j].second);
  }
  if (j % l != 0) {
    cout << n << endl;
    for (int i = 0; i < n; i++) {
      cout << s[i] << " ";
    }
    return 0;
  }
  int k = 0, m = 0;
  if (j % l == 0) {
    int t = (j / l);
    int size = t * 2 + 1;
    cout << n / size << endl;
    for (i = 0; i < l; i++) {
      c[t] = b[k];
      k++;
      for (int x = 0; x < t; x++) {
        c[x] = a[m].first;
        c[size - 1 - x] = a[m].second;
        m++;
      }
      cout << c << " ";
    }
  }
  return 0;
}
