#include <bits/stdc++.h>
using namespace std;
const long long int infinity = 9e18;
bool compare(long long int a, long long int b) { return a > b; }
bool isPossible(map<char, int> &m, int n, int len) {
  int pairs = (n / len) * (len / 2);
  int singles = (n / len) * (len & 1);
  bool val = 0;
  for (auto i : m) {
    if (pairs) {
      int pair = (i.second / 2);
      pairs = max(0, (pairs - pair));
    }
  }
  if (pairs == 0) {
    pairs = (n / len) * (len / 2);
    vector<string> v(n / len);
    int j = 0;
    string s;
    for (auto i : m) {
      if (pairs) {
        int pair = (i.second / 2);
        if (pairs - pair < 0) {
          pair = pairs;
          pairs = 0;
        } else {
          pairs = pairs - pair;
        }
        i.second -= 2 * pair;
        while (pair) {
          while (s.size() < (len / 2)) {
            s += i.first;
            pair--;
            if (pair == 0) {
              break;
            }
          }
          if (s.size() && s.size() == (len / 2)) {
            v[j++] = s;
            s = "";
          }
          if (pair == 0) break;
        }
        m[i.first] = i.second;
      }
    }
    j = 0;
    for (auto i : m) {
      while (i.second) {
        v[j++] += i.first;
        i.second--;
      }
    }
    cout << v.size() << "\n";
    for (int i = 0; i < v.size(); i++) {
      string s = v[i].substr(0, v[i].size() - 1 * (singles != 0));
      reverse(s.begin(), s.end());
      v[i] += s;
      cout << v[i] << " ";
    }
    return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<long long int> factors;
  long long int i = 1;
  for (; i * i < n; i++) {
    if (n % i == 0) {
      factors.push_back(i);
      factors.push_back(n / i);
    }
  }
  if (i * i == n) factors.push_back(i);
  sort(factors.begin(), factors.end(), compare);
  map<char, int> m;
  for (auto i : s) {
    m[i]++;
  }
  for (int i = 0; i < factors.size() - 1; i++) {
    if (isPossible(m, n, factors[i])) {
      return 0;
    }
  }
  cout << n << "\n";
  for (auto i : s) {
    cout << i << " ";
  }
  return 0;
}
