#include <bits/stdc++.h>
using namespace std;
int n, odd = 0, ansd;
string s;
map<char, int> cnt;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> s;
  for (char c : s) cnt[c]++;
  for (pair<char, int> e : cnt) odd += e.second % 2;
  for (int d = n; d >= 1; d--) {
    if (n % d != 0) continue;
    if (d % 2 == 0 and odd == 0) {
      ansd = d;
      break;
    } else if (d % 2 == 1) {
      int k = n / d;
      if (k < odd or (k - odd) % 2 == 1) continue;
      ansd = d;
      break;
    }
  }
  if (ansd == 1) {
    cout << n << endl;
    for (char c : s) cout << c << ' ';
    return 0;
  }
  int k = n / ansd;
  deque<pair<char, int>> ans;
  char center[k];
  int ansLength = 0;
  if (ansd % 2 == 1) {
    ansLength = 1;
    int j = 0;
    for (pair<char, int> e : cnt) {
      if (e.second % 2 == 1) {
        cnt[e.first]--;
        center[j] = e.first;
        j++;
      }
    }
    for (pair<char, int> e : cnt) {
      while (j < k and cnt[e.first] > 0) {
        cnt[e.first]--;
        center[j] = e.first;
        j++;
      }
    }
    ans.push_back({center[0], 1});
  }
  cout << k << endl;
  int j = 0;
  for (pair<char, int> e : cnt) {
    while (e.second) {
      int x = min(e.second, ansd - ansLength);
      e.second -= x;
      ans.push_front({e.first, x / 2});
      ans.push_back({e.first, x / 2});
      ansLength += x;
      if (ansLength == ansd) {
        for (pair<char, int> e : ans)
          for (int y = 0; y < e.second; y++) cout << e.first;
        cout << ' ';
        ans.clear();
        j++;
        ansLength = 0;
        if (j < k and odd) {
          ans.push_back({center[j], 1});
          ansLength = 1;
        }
      }
    }
  }
  cout << endl;
  return 0;
}
