#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
map<char, long long int> m;
char mids[400010];
string nds[400010];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  string s;
  cin >> s;
  for (char c : s) m[c]++;
  long long int oCt = 0;
  for (auto a : m)
    if (a.second & 1) oCt++;
  for (long long int x = 1; x < (n + 1); x++) {
    long long int l = n / x;
    if (n % x || (oCt && !(l & 1)) || (x < oCt)) continue;
    if (l & 1) {
      long long int idx = 0;
      for (auto& a : m)
        if (a.second & 1) {
          mids[idx++] = a.first;
          a.second--;
        }
      for (auto& a : m)
        while (a.second && idx < x) {
          mids[idx++] = a.first;
          mids[idx++] = a.first;
          a.second -= 2;
        }
    }
    long long int idx = 0;
    for (auto& a : m)
      for (long long int i = 0; i < (a.second / 2); i++) {
        nds[idx] += a.first;
        if (nds[idx].size() == n / x / 2) idx++;
      }
    cout << x << '\n';
    for (long long int i = 0; i < (x); i++) {
      cout << nds[i];
      if (l & 1) cout << mids[i];
      reverse(nds[i].begin(), nds[i].end());
      cout << nds[i] << ' ';
    }
    cout << '\n';
    exit(0);
  }
}
