#include <bits/stdc++.h>
using namespace std;
const int MM = 1200000;
long long int m, n, k, p1, p2, p3, p, f, a[300];
string s;
int main() {
  cin >> n >> s;
  for (int i = 0; i < n; i++) a[s[i]]++;
  int ans = 0;
  multiset<char> x;
  x.clear();
  string s2;
  for (int i = 0; i < 300; i++) {
    ans += a[i] % 2;
    if (a[i] % 2 == 1) x.insert((char)i);
    a[i] /= 2;
    while (a[i]--) s2 += (char)(i);
  }
  if (x.size() == 0) {
    cout << 1 << endl;
    cout << s2;
    reverse(s2.begin(), s2.end());
    cout << s2;
  } else {
    while (!s2.empty() && s2.length() % x.size() != 0) {
      x.insert(s2.back());
      x.insert(s2.back());
      s2.pop_back();
    }
    p2 = s2.length() / x.size();
    string tem;
    cout << x.size() << endl;
    for (char c : x) {
      tem.clear();
      p3 = p2;
      while (p3--) {
        tem.push_back(s2.back());
        s2.pop_back();
      }
      cout << tem << c;
      reverse(tem.begin(), tem.end());
      cout << tem << " ";
    }
  }
  return 0;
}
