#include <bits/stdc++.h>
using namespace std;
template <class A>
void pr(A a) {
  cout << a;
  cout << '\n';
}
template <class A, class B>
void pr(A a, B b) {
  cout << a << ' ';
  pr(b);
}
template <class A, class B, class C>
void pr(A a, B b, C c) {
  cout << a << ' ';
  pr(b, c);
}
template <class A, class B, class C, class D>
void pr(A a, B b, C c, D d) {
  cout << a << ' ';
  pr(b, c, d);
}
template <class A>
void PR(A a, long long n) {
  for (int i = (int)(0); i < (int)(n); i++) {
    if (i) cout << ' ';
    cout << a[i];
  }
  cout << '\n';
}
long long check(long long n, long long m, long long x, long long y) {
  return x >= 0 && x < n && y >= 0 && y < m;
}
const long long MAX = 1000000007, MAXL = 1LL << 61, dx[4] = {-1, 0, 1, 0},
                dy[4] = {0, 1, 0, -1};
void Main() {
  long long n;
  string s;
  cin >> n >> s;
  map<char, int> m;
  for (int i = (int)(0); i < (int)(s.size()); i++) m[s[i]]++;
  long long x = 0, y = 0;
  for (__typeof((m).begin()) it = (m).begin(); it != (m).end(); it++) {
    if (it->second % 2) x++;
    y += it->second / 2;
  }
  for (int k = (int)(max(1LL, x)); k < (int)(n + 1); k++) {
    if (n % k) continue;
    long long z = k;
    z -= x;
    if (x) {
      if (z % 2 || y - z / 2 < 0 || (y - z / 2) % k) continue;
    }
    deque<char> q[k];
    string s[k];
    int j = 0;
    for (__typeof((m).begin()) it = (m).begin(); it != (m).end(); it++) {
      if (it->second % 2) {
        q[j].push_back(it->first);
        it->second--;
        j = (j + 1) % k;
      }
    }
    if (x) {
      for (__typeof((m).begin()) it = (m).begin(); it != (m).end(); it++) {
        while (it->second && z) {
          z -= 2;
          it->second -= 2;
          q[j].push_back(it->first);
          j = (j + 1) % k;
          q[j].push_back(it->first);
          j = (j + 1) % k;
        }
      }
    }
    for (__typeof((m).begin()) it = (m).begin(); it != (m).end(); it++) {
      while (it->second) {
        it->second -= 2;
        q[j].push_front(it->first);
        q[j].push_back(it->first);
        j = (j + 1) % k;
      }
    }
    for (int i = (int)(0); i < (int)(k); i++)
      while (q[i].size()) {
        s[i] += q[i].front();
        q[i].pop_front();
      }
    pr(k);
    PR(s, k);
    return;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  Main();
  return 0;
}
