#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int charCount[1000];
vector<char> oneOf, twoOf, str;
int main(int argc, char* argv[]) {
  std::ios::sync_with_stdio(false);
  cin >> n;
  char c;
  for (int i = 0; i < 1000; ++i) {
    charCount[i] = 0;
  }
  for (int i = 0; i < n; ++i) {
    cin >> c;
    str.push_back(c);
    charCount[c - '0'] += 1;
  }
  for (int i = 0; i < 1000; ++i) {
    char A = i + '0';
    if (charCount[i] % 2 == 1) {
      oneOf.push_back(A);
    }
    for (int j = 0; j < charCount[i] / 2; ++j) {
      twoOf.push_back(A);
    }
  }
  if (oneOf.size() == 0) {
    cout << 1 << endl;
    for (int i = 0; i < n / 2; ++i) {
      cout << twoOf[i];
    }
    for (int i = (n / 2) - 1; i >= 0; --i) {
      cout << twoOf[i];
    }
  } else {
    while (oneOf.size() < twoOf.size() && twoOf.size() % oneOf.size() != 0) {
      char z = twoOf.back();
      twoOf.pop_back();
      oneOf.push_back(z);
      oneOf.push_back(z);
    }
    if (twoOf.size() % oneOf.size() == 0) {
      int k = twoOf.size() / oneOf.size();
      cout << oneOf.size() << endl;
      int idx = 0;
      for (int i = 0; i < oneOf.size(); ++i) {
        for (int j = idx; j < idx + k; ++j) {
          cout << twoOf[j];
        }
        cout << oneOf[i];
        for (int j = idx + k - 1; j >= idx; --j) {
          cout << twoOf[j];
        }
        cout << " ";
        idx += k;
      }
    } else {
      cout << n << endl;
      for (int i = 0; i < n; ++i) {
        cout << str[i] << ' ';
      }
    }
  }
  return 0;
}
