#include <bits/stdc++.h>
using namespace std;
int n, odd = 0, ansd;
string s;
map<char, int> cnt;
int main() {
  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[k];
  for (int i = 0; i < k; i++) ansLength[i] = 0;
  if (ansd % 2 == 1) {
    for (int i = 0; i < k; i++) ansLength[i] = 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 - (int)ansLength[j]);
      e.second -= x;
      ans.push_front({e.first, x / 2});
      ans.push_back({e.first, x / 2});
      ansLength[j] += x;
      if (ansLength[j] == ansd) {
        for (pair<char, int> e : ans)
          for (int y = 0; y < e.second; y++) cout << e.first;
        cout << ' ';
        ans.clear();
        j++;
        if (j < k and odd) ans.push_back({center[j], 1});
      }
    }
    if (ansLength[j] == ansd) {
      for (pair<char, int> e : ans)
        for (int y = 0; y < e.second; y++) cout << e.first;
      cout << ' ';
      ans.clear();
      j++;
      if (j < k and odd) ans.push_back({center[j], 1});
    }
  }
  while (j < k) {
    for (pair<char, int> e : ans)
      for (int y = 0; y < e.second; y++) cout << e.first;
    cout << ' ';
    j++;
  }
  cout << endl;
  return 0;
}
