#include <bits/stdc++.h>
using namespace std;
const int SIZE_N = 400000 + 10;
int n;
char str[SIZE_N];
int cnt[200];
int co, ce;
vector<vector<pair<char, int> > > ans;
void push(char c, int i) {
  vector<pair<char, int> > temp;
  temp.push_back(pair<char, int>(c, i));
  ans.push_back(temp);
}
inline void push(int i, char c, int am) {
  while (int((ans).size()) <= i) {
    ans.push_back(vector<pair<char, int> >());
  }
  ans[i].push_back(pair<char, int>(c, am));
}
void part(int k, int len) {
  for (int c = (0); c <= (int(200) - 1); ++c) {
    if ((cnt[c] % 2) == 1) {
      cnt[c]--;
      push(c, 1);
    }
  }
  int koc = k - co;
  for (int c = (0); c <= (int(200) - 1); ++c) {
    if (cnt[c] == 0) continue;
    if ((cnt[c] % 2) == 0) {
      while (cnt[c] != 0 && koc != 0) {
        --cnt[c], --koc;
        push(c, 1);
      }
    }
  }
  for (int i = (0); i <= (int(k) - 1); ++i) {
    int togo = len - 1;
    while (togo != 0) {
      for (int c = (0); c <= (int(200) - 1); ++c) {
        if (cnt[c] == 0) continue;
        int am = min(togo, cnt[c]);
        push(i, c, am);
        cnt[c] -= am;
        togo -= am;
        if (togo == 0) break;
      }
    }
  }
}
void show(int k) {
  printf("%d\n", k);
  for (int i = (0); i <= (int(k) - 1); ++i) {
    for (int j = (int((ans[i]).size()) - 1); j >= (1); --j) {
      for (int h = (0); h <= (int(ans[i][j].second >> 1) - 1); ++h)
        printf("%c", ans[i][j].first);
    }
    for (int h = (0); h <= (int(ans[i][0].second) - 1); ++h)
      printf("%c", ans[i][0].first);
    for (int j = (1); j <= (int((ans[i]).size()) - 1); ++j) {
      for (int h = (0); h <= (int(ans[i][j].second >> 1) - 1); ++h)
        printf("%c", ans[i][j].first);
    }
    printf(" ");
  }
}
int main() {
  scanf("%d", &n);
  scanf("%s", str);
  for (int i = (0); i <= (int(n) - 1); ++i) {
    cnt[str[i]]++;
  }
  for (int c = (0); c <= (int(200) - 1); ++c) {
    if (cnt[c] == 0) continue;
    if (cnt[c] & 1)
      ++co;
    else
      ++ce;
  }
  if (co == 0) {
    for (int c = (0); c <= (int(200) - 1); ++c) {
      if (cnt[c] == 0) continue;
      push(0, c, cnt[c]);
    }
    show(1);
  } else if (co == 1) {
    for (int c = (0); c <= (int(200) - 1); ++c) {
      if (cnt[c] & 1) {
        push(0, c, 1);
        cnt[c]--;
      }
    }
    for (int c = (0); c <= (int(200) - 1); ++c) {
      if (cnt[c] == 0) continue;
      push(0, c, cnt[c]);
    }
    show(1);
  } else {
    for (int k = (co); k <= (n); ++k) {
      if ((n % k) != 0) continue;
      if ((k - co) % 2 == 1) continue;
      if (((n / k) % 2) == 0) continue;
      part(k, n / k);
      show(k);
      break;
    }
  }
  return 0;
}
