#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
const int N = 500006;
const long long INF = 1e18;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  set<int> divs;
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      divs.insert(i);
      divs.insert(n / i);
    }
  }
  map<char, int> h;
  for (int i = 1; i <= n; i++) {
    char c;
    cin >> c;
    h[c]++;
  }
  int cnt = 0;
  int alone = 0;
  for (auto it : h) {
    cnt += it.second / 2;
    alone += it.second % 2;
  }
  int ans;
  int one, two;
  for (auto it : divs) {
    int cnt_each = n / it;
    int need_2 = (cnt_each / 2) * it;
    int need_1 = n - need_2 * 2;
    if (cnt < need_2) continue;
    int temp_2 = cnt;
    temp_2 -= need_2;
    if (temp_2 * 2 + alone == need_1) {
      one = alone;
      two = temp_2;
      ans = it;
      break;
    }
  }
  vector<char> sing;
  for (auto &it : h) {
    if (it.second & 1) {
      sing.push_back(it.first);
      it.second--;
    }
  }
  for (auto &it : h) {
    if (two) {
      int mn = min(two, it.second / 2);
      two -= mn;
      it.second -= mn * 2;
      for (int i = 1; i <= mn * 2; i++) {
        sing.push_back(it.first);
      }
    }
  }
  int len = n / ans;
  cout << ans << '\n';
  for (int i = 1; i <= ans; i++) {
    vector<char> str(len + 1);
    int l = 1, r = len;
    while (l < r) {
      auto it = h.begin();
      if (it->second == 0) {
        h.erase(it);
        continue;
      }
      it->second -= 2;
      if (it->second == 0) {
        h.erase(it);
      }
      str[l] = str[r] = it->first;
      l++;
      r--;
    }
    if (l == r) {
      str[l] = sing.back();
      sing.pop_back();
    }
    for (int j = 1; j <= len; j++) {
      cout << str[j];
    }
    cout << ' ';
  }
  return 0;
}
