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>
#pragma GCC target("sse2")
#pragma GCC optimization("O2")
#pragma GCC optimization("unroll-loops")
#pragma GCC optimize "trapv"
using namespace std;
const int maxn = 1000500;
inline int g() {
  int x;
  cin >> x;
  return x;
}
inline long long gl() {
  long long x;
  cin >> x;
  return x;
}
inline char gc() {
  char x;
  cin >> x;
  return x;
}
inline string gs() {
  string s;
  cin >> s;
  return s;
}
template <typename T>
inline vector<T> gv(int len) {
  vector<T> a(len);
  for (auto &it : a) cin >> it;
  return a;
}
inline vector<int> gv(int len) {
  vector<int> a(len);
  for (auto &it : a) cin >> it;
  return a;
}
inline vector<pair<int, int>> gv_andPairCnt(int len) {
  vector<pair<int, int>> a(len);
  int i = 1;
  for (auto &it : a) {
    it.second = i;
    i++;
    cin >> it.first;
  }
  return a;
}
double power_log(double power, double val) { return log(val) / log(power); }
template <typename T>
T sqr(T x) {
  return x * x;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  for (auto it : v) os << it << ", ";
  os << "\n";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const deque<T> &v) {
  os << "deque:{";
  for (auto it : v) os << it << " ";
  os << "}\n";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const set<T> &v) {
  os << "set:{";
  for (auto it : v) os << it << " ";
  os << "}";
  return os;
}
template <typename T, typename T2>
ostream &operator<<(ostream &os, const map<T, T2> &v) {
  os << "map:{\n";
  for (auto it : v) os << "    {" << it.first << " <> " << it.second << "}\n";
  os << "}\n";
  return os;
}
template <typename T, typename T2>
ostream &operator<<(ostream &os, const pair<T, T2> &v) {
  os << "{" << v.first << ", " << v.second << "}";
  return os;
}
template <typename T, typename H>
inline vector<pair<T, H>> gv_andBiPair(int len) {
  vector<pair<T, H>> a(len);
  for (auto &it : a) {
    cin >> it.first >> it.second;
  }
  return a;
}
template <typename T>
inline set<T> vector_to_set(const vector<T> &vec) {
  set<T> s;
  for (auto &it : vec) s.insert(it);
  return s;
}
const long long md = 1e9 + 7;
vector<int> arr[maxn];
int cnt[maxn], cnt2[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n = g();
  map<char, int> mp;
  string s;
  cin >> s;
  for (auto &it : s) {
    mp[it]++;
  }
  auto solve = [&](int len) {
    map<char, int> mp2 = mp;
    vector<char> odd;
    if ((n / len) % 2 != 0) {
      for (auto &it : mp2) {
        if (it.second % 2 != 0) {
          odd.push_back(it.first);
          it.second--;
        }
      }
      if (odd.size() != len) {
        for (auto &it : mp2) {
          while (it.second > 1 && odd.size() < len) {
            odd.push_back(it.first);
            odd.push_back(it.first);
            it.second -= 2;
          }
        }
      }
      if (odd.size() != len) {
        return;
      }
    }
    vector<string> ans;
    for (int T = 0; T < (len); ++T) {
      string tmp;
      for (auto &it : mp2) {
        while (it.second > 1 && tmp.size() != (n / len) / 2) {
          it.second -= 2;
          tmp += it.first;
        }
      }
      if (tmp.size() != (n / len) / 2) {
        return;
      }
      string tmp2 = tmp;
      if ((n / len) % 2 != 0) {
        assert(!odd.empty());
        tmp2 += odd.back();
        odd.pop_back();
      }
      reverse(tmp.begin(), tmp.end());
      tmp2 += tmp;
      ans.push_back(tmp2);
    }
    cout << len << "\n";
    for (auto &it : ans) {
      cout << it << " ";
    }
    exit(0);
  };
  vector<int> arr;
  for (long long i = 1; i * i <= s.size(); i++) {
    if (n % i == 0) {
      arr.push_back(i);
      if (i != n / i) {
        arr.push_back(n / i);
      }
    }
  }
  sort(arr.begin(), arr.end());
  for (auto &it : arr) {
    solve(it);
  }
}