#include <bits/stdc++.h>
using namespace std;
long long n, d;
string s;
char a[250005];
vector<char> o, j;
map<char, int> dd;
int main() {
  cin >> n >> s;
  s = " " + s;
  for (int i = 1; i <= n; i++) {
    dd[s[i]]++;
    if (dd[s[i]] == 1) a[++d] = s[i];
  }
  for (int i = 1; i <= d; i++) {
    int l = dd[a[i]];
    if (l % 2) j.push_back(a[i]);
    while (l / 2) {
      o.push_back(a[i]);
      l -= 2;
    }
  }
  int o1 = o.size(), j1 = j.size();
  if (!j1) j1 = 1;
  while (true) {
    if (o1 % j1 == 0) {
      cout << j1 << endl;
      break;
    }
    o1--;
    j1 += 2;
    char c = o.back();
    o.pop_back();
    for (int i = 1; i <= 2; i++) j.push_back(c);
  }
  int lo = j1;
  while (lo--) {
    vector<char> bk;
    for (int i = 1; i <= o1 / j1; i++) {
      cout << o.back();
      bk.push_back(o.back());
      o.pop_back();
    }
    if (!j.empty()) {
      cout << j.back();
      j.pop_back();
    }
    for (int i = 1; i <= o1 / j1; i++) {
      cout << bk.back();
      bk.pop_back();
    }
    cout << ' ';
  }
}
