#include <bits/stdc++.h>
using namespace std;
map<char, long long> mp;
signed main() {
  ios_base::sync_with_stdio(false);
  long long n;
  cin >> n;
  string s;
  cin >> s;
  for (long long i = 0; i < n; i++) mp[s[i]]++;
  string str;
  for (auto it = mp.begin(); it != mp.end(); it++) {
    if (it->second & 1) {
      str.push_back(it->first);
      it->second--;
    }
  }
  if (str.size() == 0) {
    cout << 1 << endl;
    string cp;
    sort((s).begin(), (s).end());
    for (long long i = 0; i < n; i += 2) cp.push_back(s[i]);
    s = cp;
    reverse((cp).begin(), (cp).end());
    s += cp;
    cout << s;
    return 0;
  }
  long long p = n - str.size(), q = str.size(), sen = 0;
  while ((p / 2 - sen) % (2 * sen + q)) {
    sen += 1;
  }
  sen = sen * 2;
  for (auto it = mp.begin(); it != mp.end(); it++) {
    if (sen == 0) break;
    if (it->second >= sen) {
      for (long long i = 0; i < sen; i++) str.push_back(it->first);
      it->second -= sen;
      sen = 0;
    } else {
      for (long long i = 0; i < it->second; i++) str.push_back(it->first);
      sen -= it->second;
      it->second = 0;
    }
  }
  string out;
  for (auto it = mp.begin(); it != mp.end(); it++) {
    for (long long j = 0; j < it->second; j++) out.push_back(it->first);
  }
  sort((out).begin(), (out).end());
  string outc;
  for (long long i = 1; i < out.size(); i += 2) outc.push_back(out[i]);
  out = outc;
  long long in = 0;
  string ans[str.size()];
  long long cur = out.size() / str.size();
  for (long long i = 0; i < str.size(); i++) {
    string tst = out.substr(in, cur);
    ans[i] = tst;
    in += cur;
  }
  cout << str.size() << endl;
  for (long long i = 0; i < str.size(); i++) ans[i].push_back(str[i]);
  for (long long i = 0; i < str.size(); i++) {
    string sss = ans[i].substr(0, ans[i].size() - 1);
    reverse((sss).begin(), (sss).end());
    ans[i] += sss;
  }
  for (long long i = 0; i < str.size(); i++) cout << ans[i] << " ";
}
