#include <bits/stdc++.h>
using namespace std;
int N, cnt[128], iss[128], tots, lef;
char ss[400005], out[400005];
void print() {
  printf("%d\n", tots);
  int len = lef / tots / 2;
  for (int i = 48; i <= 122; i++) {
    if (iss[i]) {
      tots--;
      cnt[i]--;
      for (int j = 48, tlen = 0; j <= 122; j++) {
        if (!cnt[j]) continue;
        if (len - tlen >= cnt[j] / 2) {
          cnt[j] /= 2;
          while (cnt[j]) out[++tlen] = j, cnt[j]--;
        } else {
          while (len - tlen) {
            out[++tlen] = j;
            cnt[j] -= 2;
          }
          break;
        }
      }
      for (int j = 1; j <= len; j++) printf("%c", out[j]);
      printf("%c", i);
      for (int j = len; j >= 1; j--) printf("%c", out[j]);
      printf(" ");
    }
  }
  for (int i = 1; i <= tots; i += 2) {
    for (int j = 48; j <= 122; j++) {
      while (cnt[j]) {
        lef -= 2;
        cnt[j] -= 2;
        for (int k = 48, tlen = 0; k <= 122; k++) {
          if (!cnt[k]) continue;
          if (len - tlen > cnt[k] / 2) {
            cnt[k] /= 2;
            while (cnt[k]) out[++tlen] = k, cnt[k]--;
          } else {
            while (len - tlen) {
              out[++tlen] = k;
              cnt[k] -= 2;
            }
          }
        }
        for (int k = 1; k <= len; k++) printf("%c", out[k]);
        printf("%c", j);
        for (int k = len; k >= 1; k--) printf("%c", out[k]);
        printf(" ");
        for (int k = 48, tlen = 0; k <= 122; k++) {
          if (!cnt[k]) continue;
          if (cnt[k] && len - tlen > cnt[k] / 2) {
            cnt[k] /= 2;
            while (cnt[k]) out[++tlen] = k, cnt[k]--;
          } else {
            while (len - tlen) {
              out[++tlen] = k;
              cnt[k] -= 2;
            }
          }
        }
        for (int k = 1; k <= len; k++) printf("%c", out[k]);
        printf("%c", j);
        for (int k = len; k >= 1; k--) printf("%c", out[k]);
        printf(" ");
      }
    }
  }
}
void solve() {
  if (tots == 0) {
    printf("1\n");
    for (int i = 1; i <= 127; i++)
      if (cnt[i]) {
        int tmp = cnt[i] / 2;
        for (int j = 1; j <= tmp; j++) printf("%c", i);
      }
    for (int i = 127; i >= 1; i--)
      if (cnt[i]) {
        int tmp = cnt[i] / 2;
        for (int j = 1; j <= tmp; j++) printf("%c", i);
      }
    exit(0);
  }
  for (; lef >= 2 * tots; lef -= 2, tots += 2)
    if (lef % tots == 0 && (lef / tots) % 2 == 0) {
      print();
      exit(0);
    }
  printf("%d\n", N);
  for (int i = 1; i <= N; i++) printf("%c ", ss[i]);
}
int main() {
  scanf("%d", &N);
  scanf("%s", ss + 1);
  for (int i = 1; i <= N; i++) cnt[ss[i]]++;
  for (int i = 48; i <= 122; i++) {
    if (cnt[i] & 1) {
      tots++;
      iss[i] = 1;
    }
  }
  lef = N - tots;
  solve();
}
