#include <bits/stdc++.h>
using namespace std;
template <class C>
void mini(C &a4, C b4) {
  a4 = min(a4, b4);
}
template <class C>
void maxi(C &a4, C b4) {
  a4 = max(a4, b4);
}
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << "=" << h << "\n";
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << "=" << h << ",";
  _dbg(sdbg + 1, a...);
}
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  os << "[";
  for (auto vv : V) os << vv << ",";
  return os << "]";
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
int32_t main() {
  long long n;
  cin >> n;
  string s;
  cin >> s;
  map<char, long long> mapka;
  for (char c : s) {
    mapka[c]++;
  }
  vector<char> parzyste, nieparzyste;
  for (auto p : mapka) {
    if (p.second % 2 == 1) {
      nieparzyste.push_back(p.first);
    } else {
      parzyste.push_back(p.first);
    }
  }
  if (nieparzyste.empty()) {
    cout << "1\n";
    string t;
    for (auto p : mapka) {
      for (long long i = 0; i < p.second / 2; i++) t.push_back(p.first);
    }
    string r = t;
    reverse((r).begin(), (r).end());
    t += r;
    cout << t << "\n";
    return 0;
  }
  long long k = nieparzyste.size();
  long long l = parzyste.size();
  for (long long d = n / k; d >= 1; d--)
    if (n % d == 0 && d % 2 == 1) {
      if ((n / d - k) % 2 == 0) {
        vector<char> kubelki = nieparzyste;
        for (auto c : nieparzyste) mapka[c]--;
        while (kubelki.size() < n / d) {
          if (!parzyste.empty()) {
            kubelki.push_back(parzyste.back());
            mapka[parzyste.back()]--;
            if (mapka[parzyste.back()] == 0) parzyste.pop_back();
          } else {
            while (mapka[nieparzyste.back()] == 0) nieparzyste.pop_back();
            kubelki.push_back(nieparzyste.back());
            mapka[nieparzyste.back()]--;
          }
        }
        cout << kubelki.size() << "\n";
        vector<char> pozostale;
        merge(parzyste.begin(), parzyste.end(), nieparzyste.begin(),
              nieparzyste.end(), back_inserter(pozostale));
        for (auto c : kubelki) {
          string t;
          long long ile = (d - 1) / 2;
          for (long long _ = (0); _ <= ((long long)(ile)-1); _++) {
            while (mapka[pozostale.back()] == 0) pozostale.pop_back();
            t.push_back(pozostale.back());
            mapka[pozostale.back()] -= 2;
          }
          cout << t;
          cout << c;
          reverse((t).begin(), (t).end());
          cout << t;
          cout << " ";
        }
        break;
      }
    }
  cout << "\n";
}
