Problem: Kolya has a string s of length n consisting of lowercase and uppercase Latin letters and digits.

He wants to rearrange the symbols in s and cut it into the minimum number of parts so that each part is a palindrome and all parts have the same lengths. A palindrome is a string which reads the same backward as forward, such as madam or racecar.

Your task is to help Kolya and determine the minimum number of palindromes of equal lengths to cut s into, if it is allowed to rearrange letters in s before cuttings.

Input

The first line contains an integer n (1 ≤ n ≤ 4·105) — the length of string s.

The second line contains a string s of length n consisting of lowercase and uppercase Latin letters and digits.

Output

Print to the first line an integer k — minimum number of palindromes into which you can cut a given string.

Print to the second line k strings — the palindromes themselves. Separate them by a space. You are allowed to print palindromes in arbitrary order. All of them should have the same length.

Examples

Input

6
aabaac


Output

2
aba aca 

Input

8
0rTrT022


Output

1
02TrrT20 

Input

2
aA


Output

2
a A 

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
bool is_prime(int n) {
  for (int i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
inline long long getPow(long long a, long long b) {
  long long res = 1, tp = a;
  while (b) {
    if (b & 1ll) {
      res *= tp;
      res %= 1000000007;
    }
    tp *= tp;
    tp %= 1000000007;
    b >>= 1ll;
  }
  return res;
}
inline long long to_ll(string s) {
  long long cur = 0;
  for (int i = 0; i < s.size(); i++) {
    cur = cur * 10 + s[i] - '0';
  }
  return cur;
}
inline string to_str(long long x) {
  string s = "";
  while (x) {
    s += char(x % 10 + '0');
    x /= 10;
  }
  reverse(s.begin(), s.end());
  return s;
}
inline long long nxt() {
  long long x;
  scanf("%lld", &x);
  return x;
}
void ok() {
  puts("YES");
  exit(0);
}
void panic() {
  puts("NO");
  exit(0);
}
const long long N = 1e6 + 5;
int main() {
  vector<int> cnt(256, 0);
  long long n = nxt();
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    cnt[s[i]]++;
  }
  long long ct = 0;
  for (int i = 0; i < 256; i++) {
    ct += cnt[i] % 2;
  }
  for (int i = 1; i <= n; i++) {
    if (n % i) {
      continue;
    }
    if (i >= ct && n / i % 2) {
      printf("%d\n", i);
      long long sz = n / i;
      vector<int> cur;
      for (int j = 0; j < 256; j++) {
        if (cnt[j] % 2) {
          cur.push_back(j);
          cnt[j]--;
        }
      }
      long long ind = 0;
      while (cur.size() < i) {
        if (cnt[ind] >= 2 && cnt[ind] % 2 == 0) {
          cur.push_back(ind);
          cur.push_back(ind);
          cnt[ind] -= 2;
        }
        ind += 1;
        ind %= 256;
      }
      long long tp = 1;
      long long j = 0;
      long long ia = 0;
      string d = "";
      vector<string> str(i);
      while (j < 256 && ia < i) {
        long long len = cnt[j];
        long long need = sz - tp;
        if (need <= len) {
          cnt[j] -= need;
          for (int e = 0; e < need / 2; e++) {
            d += char(j);
          }
          if (cnt[j] == 0) {
            j++;
          }
          str[ia] = d;
          d = "";
          tp = 1;
          ia++;
        } else {
          tp += len;
          for (int e = 0; e < len / 2; e++) {
            d += char(j);
          }
          j++;
        }
      }
      for (int ja = 0; ja < i; ja++) {
        if (ja) printf(" ");
        printf("%s", str[ja].c_str());
        printf("%c", (char)cur[ja]);
        reverse(str[ja].begin(), str[ja].end());
        printf("%s", str[ja].c_str());
      }
      printf("\n");
      return 0;
    }
    if (ct == 0 && n / i % 2 == 0) {
      printf("%d\n", i);
      long long sz = n / i;
      long long tp = 0;
      long long j = 0;
      long long ia = 0;
      string d = "";
      vector<string> str(i);
      while (j < 256 && ia < i) {
        long long len = cnt[j];
        long long need = sz - tp;
        if (need <= len) {
          cnt[j] -= need;
          for (int e = 0; e < need / 2; e++) {
            d += char(j);
          }
          if (cnt[j] == 0) {
            j++;
          }
          str[ia] = d;
          d = "";
          tp = 0;
          ia++;
        } else {
          tp += len;
          for (int e = 0; e < len / 2; e++) {
            d += char(j);
          }
          j++;
        }
      }
      for (int ja = 0; ja < i; ja++) {
        if (ja) printf(" ");
        printf("%s", str[ja].c_str());
        reverse(str[ja].begin(), str[ja].end());
        printf("%s", str[ja].c_str());
      }
      printf("\n");
      return 0;
    }
  }
  return 0;
}