#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 4;
const long long inf = 1e18;
const int mod = 1e9 + 7;
const int maxlog = 31;
map<char, int> cnt;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < n; i++) {
    cnt[s[i]]++;
  }
  int x = 0;
  for (map<char, int>::iterator it = cnt.begin(); it != cnt.end(); it++) {
    if ((*it).second % 2 == 1) x++;
  }
  if (x == 0) {
    string ans1, ans2;
    sort(s.begin(), s.end());
    for (int i = 0; i < s.size(); i++)
      if (i & 1)
        ans1.push_back(s[i]);
      else
        ans2.push_back(s[i]);
    reverse(ans2.begin(), ans2.end());
    cout << 1 << endl << ans1 << ans2;
    return 0;
  }
  int m = n / x;
  for (int i = m; i >= 1; i--) {
    if ((i & 1) && n % i == 0) {
      m = i;
      break;
    }
  }
  cout << n / m << endl;
  for (int t = 0; t < n / m; t++) {
    char mid = '!';
    for (map<char, int>::iterator it = cnt.begin(); it != cnt.end(); it++) {
      if ((*it).second == 0) continue;
      if (mid == '!')
        mid = (*it).first;
      else if ((*it).second % 2 == 1)
        mid = (*it).first;
    }
    cnt[mid]--;
    string ans1, ans2;
    for (map<char, int>::iterator it = cnt.begin(); it != cnt.end(); it++) {
      int cntt = (*it).second;
      while (cntt >= 2) {
        if (ans1.size() == (m - 1) / 2) {
          break;
        }
        ans1 += (*it).first;
        ans2 += (*it).first;
        cntt -= 2;
      }
    }
    for (int i = 0; i < ans1.size(); i++) cnt[ans1[i]] -= 2;
    reverse(ans2.begin(), ans2.end());
    cout << ans1 << mid << ans2 << " ";
  }
  return 0;
}
