#include "bits/stdc++.h"

using namespace std;

#define _ ios_base::sync_with_stdio(false); cin.tie(NULL);

int cnt[300];

int32_t main() { _
	int n;
	string s;
	cin >> n >> s;
	map<char, int> m;
	for (int i = 0; i < n; ++i)
		++m[s[i]];
	vector<string> ans;
	int sth = 0;
	for (auto i: m) {
		if (i.second & 1) {
			string sr;
			sr += i.first;
			ans.push_back(sr);
			--i.second;
		} else {
			sth += i.second;
		}
	}
	if (ans.size() == 0) {
		string str;
		for (auto i: m) {
			if (i.second > 0) {
				int j = 1;
				while (j * 2 <= i.second) {
					str = i.first + str + i.first;
					++j;
				}
			}
		}
		cout << "1\n" << str << endl;
		return 0;
	}
	if (sth % ans.size() != 0) {
		cout << s.length() << endl;
		for (auto i: s)
			cout << i << ' ';
		cout << endl;
		return 0;
	}
	sth /= ans.size();
	int ptr = 0;
	for (auto i: m) {
		if (i.second > 0) {
			int j = 1;
			while (j * 2 <= i.second) {
				while (cnt[ptr] < sth) {
					if (j * 2 <= i.second) {
						cnt[ptr] += 2;
						ans[ptr] = i.first + ans[ptr] + i.first;
						++j;
					} else break;
				}
				if (cnt[ptr] == sth)
					++ptr;
			}
		}
	}

	cout << ans.size() << endl;
	for (auto i: ans)
		cout << i << ' ';
	cout << endl;
}


#include <bits/stdc++.h>

using namespace std;
using ll = long long;

int main()
{
	map<char, int> couples;
	set<char> single;

	int N; cin >> N;
	string s;
	cin >> s;

	int couples_count = 0;
	for(const char c : s)
	{
		if(single.count(c) == 0)
		{
			single.insert(c);
		}
		else
		{
			single.erase(c);
			couples[c]++;
			couples_count++;
		}
	}

	if(single.size() == 0)
	{
		string res(2*couples_count, '-');
		int first = 0, last = res.size()-1;
		auto couples_it = couples.begin();
		while(first < last)
		{
			res[first] = res[last] = couples_it->first;

			first++; last--;
			couples_it->second--;
			if(couples_it->second <= 0)
				couples_it++;
		}
		cout << "1\n" << res;
	}
	else
	{
		vector<char> single_new(single.begin(), single.end());

		int length_of_string = 2*couples_count / single_new.size() + 1;
		auto couples_it = couples.begin();
		while(couples_count % single_new.size() != 0)
		{
			single_new.push_back(couples_it->first);
			single_new.push_back(couples_it->first);

			couples_it->second--;
			if(couples_it->second <= 0)
				couples_it++;
			couples_count--;

			length_of_string = 2*couples_count / single_new.size() + 1;
		}

		int n_of_strings = single_new.size();
		cout << n_of_strings << '\n';

		for(const auto single_char : single_new)
		{
			string res(length_of_string, '-');
			res[length_of_string / 2] = single_char;

			int first = 0, last = res.size()-1;
			while(first < last)
			{
				res[first] = res[last] = couples_it->first;

				first++; last--;
				couples_it->second--;
				if(couples_it->second <= 0)
					couples_it++;
			}

			cout << res << ' ';
		}
	}

	return 0;
}


#include "bits/stdc++.h"

using namespace std;

#define _ ios_base::sync_with_stdio(false); cin.tie(NULL);

int cnt[300], m[300];

int32_t main() { _
	int n;
	string s;
	cin >> n >> s;
	vector<char> chs, evens;
	for (int i = 0; i < n; ++i) {
		++m[s[i]];
		chs.push_back(s[i]);
	}
	sort(chs.begin(), chs.end());
	chs.resize(unique(chs.begin(), chs.end()) - chs.begin());
	vector<string> ans;

	int sth = 0;
	for (auto ch: chs) {
		if (m[ch] & 1) {
			string sr;
			sr += ch;
			ans.push_back(sr);
			--m[ch];
			if (m[ch] > 0) {
				sth += m[ch];
				evens.push_back(ch);
			}
		} else {
			sth += m[ch];
			evens.push_back(ch);
		}
	}
	if (ans.size() == 0) {
		string str;
		for (auto ch: chs) {
			if (m[ch] > 0) {
				int j = 1;
				while (j * 2 <= m[ch]) {
					str = ch + str + ch;
					++j;
				}
			}
		}
		cout << "1\n" << str << endl;
		return 0;
	}
	sth /= 2;
	if (sth % ans.size() != 0) {
		cout << s.length() << '\n';
		for (auto i: s)
			cout << i << ' ';
		cout << endl;
		return 0;
	}
	sth /= ans.size();
	cout << ans.size() << '\n';
	auto ptr = evens.begin();
	for (int i = 0; i < ans.size(); ++i) {
		string all;
		int C = 0;
		while (C < sth) {
			while (C < sth and cnt[*ptr] < m[*ptr]) {
				++cnt[i];
				++C;
				all += *ptr;
			}
			if (C < sth) ++ptr;
		}
		string rev = all;
		reverse(all.begin(), all.end());
		cout << rev << ans[i] << all << ' ';
	}
	cout << '\n';
}


#include "bits/stdc++.h"

using namespace std;

#define _ ios_base::sync_with_stdio(false); cin.tie(NULL);

int cnt[300], m[300];

int32_t main() { _
	int n;
	string s;
	cin >> n >> s;
	vector<char> chs, evens;
	for (int i = 0; i < n; ++i) {
		++m[s[i]];
		chs.push_back(s[i]);
	}
	sort(chs.begin(), chs.end());
	chs.resize(unique(chs.begin(), chs.end()) - chs.begin());
	vector<string> ans;

	int sth = 0;
	for (auto ch: chs) {
		if (m[ch] & 1) {
			string sr;
			sr += ch;
			ans.push_back(sr);
			--m[ch];
		} else {
			sth += m[ch];
			evens.push_back(ch);
		}
	}
	if (ans.size() == 0) {
		string str;
		for (auto ch: chs) {
			if (m[ch] > 0) {
				int j = 1;
				while (j * 2 <= m[ch]) {
					str = ch + str + ch;
					++j;
				}
			}
		}
		cout << "1\n" << str << endl;
		return 0;
	}
	if (sth % ans.size() != 0) {
		cout << s.length() << '\n';
		for (auto i: s)
			cout << i << ' ';
		cout << endl;
		return 0;
	}
	sth /= ans.size();
	cout << ans.size() << '\n';
	auto ptr = evens.begin();
	for (int i = 0; i < ans.size(); ++i) {
		string all;
		int C = 0;
		while (C < sth) {
			while (C < sth and cnt[*ptr] < m[*ptr]) {
				cnt[i] += 2;
				C += 2;
				all += *ptr;
			}
			if (C < sth) ++ptr;
		}
		string rev = all;
		reverse(all.begin(), all.end());
		cout << rev << ans[i] << all << ' ';
	}
	cout << '\n';
}


#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<bits/stdc++.h>
#include<queue>
#define FOR0(i,n) for(i=0;i<n;i++)
#define FOR(i,j,n) for(i=j;i<n;i++)
#define FORD(i,j,k) for(i=j;i>=k;i--)
#define pb push_back
inline long long  MAX2(long long  a, long long int b){return (a)>(b)?(a):(b);}
inline long long  MAX3(long long  a, long long  b,long long  c){return (a)>(b)?((a)>(c)?(a):(c)):((b)>(c)?(b):(c));}
inline long long  MIN2(long long  a, long long  b){return (a)<(b)?(a):(b);}
inline long long  MIN3(long long  a, long long b,long long c){return (a)<(b)?((a)<(c)?(a):(c)):((b)<(c)?(b):(c));}
using namespace std;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector< pair<int,int> > vii;
typedef long long ll;
char rechar(int i)
{
	if(i>=0&&i<=25)
		return 'A'+i;
	if(i>=26&&i<=51)
		return 'a'+(i -26);
	if(i>=52&&i<=61)
		return '0'+(i -52);
}
int main()
{
	int ch[65]={};
	ll n,i,j,k;
	string s;
	cin>>n;
	cin>>s;
	FOR0(i,n)
	{
	      if(s[i]>='A'&&s[i]<='Z')
			  ch[s[i]-'A']++;
		  else if( s[i] >='a'&&s[i]<='z')
			  ch[26+s[i]-'a']++;
		  else
			  ch[52+s[i]-'0']++;
	}
	ll np=0;
	vll centers;
	FOR0(i,62)
	{
		if(ch[i]%2!=0)
		{
			np++;
			ch[i]--;
	        centers.pb(i);
		}
	}
	if(np==0)
	{
		cout<<1<<endl;
		string out;
		ll mid=n/2;
		FOR0(j,mid)
		{
			FOR0(k,62)
			if(ch[k]>0)
			{
				ch[k]-=2;
				out+=rechar(k);
				break;
			}
		}
		for(j=1;j+mid<=n;j++)
		{
			out+=out[mid-j];
		}
		cout<<out;
		return 0;
	}
	ll sp=(n/np);
	if(sp%2==0||n%np!=0)
	{
		cout<<n<<endl;
		FOR0(i,n)
		cout<<s[i]<< " ";
		return 0;
	}
	cout<<np<<endl;
	FOR0(i,centers.size())
	{
		ll mid = sp/2;
		string out;
        FOR0(j,mid)
		{
			FOR0(k,62)
			if(ch[k]>0)
			{
				ch[k]-=2;
				out+=rechar(k);
				break;
			}
		}
        out+=rechar(centers[i]);
        for(j=1;j+mid<sp;j++)
		{
			out+= out[mid-j];
		}
		cout<<out<<" ";
	}
}


#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<bits/stdc++.h>
#include<queue>
#define FOR0(i,n) for(i=0;i<n;i++)
#define FOR(i,j,n) for(i=j;i<n;i++)
#define FORD(i,j,k) for(i=j;i>=k;i--)
#define pb push_back
inline long long  MAX2(long long  a, long long int b){return (a)>(b)?(a):(b);}
inline long long  MAX3(long long  a, long long  b,long long  c){return (a)>(b)?((a)>(c)?(a):(c)):((b)>(c)?(b):(c));}
inline long long  MIN2(long long  a, long long  b){return (a)<(b)?(a):(b);}
inline long long  MIN3(long long  a, long long b,long long c){return (a)<(b)?((a)<(c)?(a):(c)):((b)<(c)?(b):(c));}
using namespace std;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector< pair<int,int> > vii;
typedef long long ll;
char rechar(int i)
{
	if(i>=0&&i<=25)
		return 'A'+i;
	if(i>=26&&i<=51)
		return 'a'+(i -26);
	if(i>=52&&i<=61)
		return '0'+(i -52);
}
int main()
{
	int ch[65]={};
	ll n,i,j,k;
	string s;
	cin>>n;
	cin>>s;
	FOR0(i,n)
	{
	      if(s[i]>='A'&&s[i]<='Z')
			  ch[s[i]-'A']++;
		  else if( s[i] >='a'&&s[i]<='z')
			  ch[26+s[i]-'a']++;
		  else
			  ch[52+s[i]-'0']++;
	}
	ll np=0;
	vll centers;
	FOR0(i,62)
	{
		if(ch[i]%2!=0)
		{
			np++;
			ch[i]--;
	        centers.pb(i);
		}
	}
	if(np==0)
	{
		cout<<1<<endl;
		cout<<s;
		return 0;
	}
	ll sp=(n/np);
	cout<<np<<endl;
	FOR0(i,centers.size())
	{
		ll mid = sp/2;
		string out;
        FOR0(j,mid)
		{
			FOR0(k,62)
			if(ch[k]>0)
			{
				ch[k]-=2;
				out+=rechar(k);
				break;
			}
		}
        out+=rechar(centers[i]);
        for(j=1;j+mid<sp;j++)
		{
			out+= out[mid-j];
		}
		cout<<out<<" ";
	}
}


#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<bits/stdc++.h>
#include<queue>
#define FOR0(i,n) for(i=0;i<n;i++)
#define FOR(i,j,n) for(i=j;i<n;i++)
#define FORD(i,j,k) for(i=j;i>=k;i--)
#define pb push_back
inline long long  MAX2(long long  a, long long int b){return (a)>(b)?(a):(b);}
inline long long  MAX3(long long  a, long long  b,long long  c){return (a)>(b)?((a)>(c)?(a):(c)):((b)>(c)?(b):(c));}
inline long long  MIN2(long long  a, long long  b){return (a)<(b)?(a):(b);}
inline long long  MIN3(long long  a, long long b,long long c){return (a)<(b)?((a)<(c)?(a):(c)):((b)<(c)?(b):(c));}
using namespace std;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector< pair<int,int> > vii;
typedef long long ll;
char rechar(int i)
{
	if(i>=0&&i<=25)
		return 'A'+i;
	if(i>=26&&i<=51)
		return 'a'+(i -26);
	if(i>=52&&i<=61)
		return '0'+(i -52);
}
int main()
{
	int ch[65]={};
	ll n,i,j,k;
	string s;
	cin>>n;
	cin>>s;
	FOR0(i,n)
	{
	      if(s[i]>='A'&&s[i]<='Z')
			  ch[s[i]-'A']++;
		  else if( s[i] >='a'&&s[i]<='z')
			  ch[26+s[i]-'a']++;
		  else
			  ch[52+s[i]-'0']++;
	}
	ll np=0;
	vll centers;
	FOR0(i,62)
	{
		if(ch[i]%2!=0)
		{
			np++;
			ch[i]--;
	        centers.pb(i);
		}
	}
	if(np==0)
	{
		cout<<1<<endl;
		string out;
		ll mid=n/2;
		FOR0(j,mid)
		{
			FOR0(k,62)
			if(ch[k]>0)
			{
				ch[k]-=2;
				out+=rechar(k);
				break;
			}
		}
		for(j=1;j+mid<=n;j++)
		{
			out+=out[mid-j];
		}
		cout<<out;
		return 0;
	}
	ll sp=(n/np);
	if(n%np!=0)
	{
		cout<<n<<endl;
		FOR0(i,n)
		cout<<s[i]<< " ";
		return 0;
	}
	while(sp%2==0)
	{
		ll k = (n/sp);
		FOR0(i,62)
	    {
			int flag=0;
			while(ch[i]>0)
			{
				centers.pb(i);
				centers.pb(i);
				ch[i]-=2;
				k-=2;
				if(k==0)
				{
					flag=1;break;
				}
			}
			if(flag==1)break;
		}
		sp/=2;
	}
	np= (n/sp);
	cout<<np<<endl;
	FOR0(i,centers.size())
	{
		ll mid = sp/2;
		string out;
        FOR0(j,mid)
		{
			FOR0(k,62)
			if(ch[k]>0)
			{
				ch[k]-=2;
				out+=rechar(k);
				break;
			}
		}
        out+=rechar(centers[i]);
        for(j=1;j+mid<sp;j++)
		{
			out+= out[mid-j];
		}
		cout<<out<<" ";
	}
}


#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<bits/stdc++.h>
#include<queue>
#define FOR0(i,n) for(i=0;i<n;i++)
#define FOR(i,j,n) for(i=j;i<n;i++)
#define FORD(i,j,k) for(i=j;i>=k;i--)
#define pb push_back
inline long long  MAX2(long long  a, long long int b){return (a)>(b)?(a):(b);}
inline long long  MAX3(long long  a, long long  b,long long  c){return (a)>(b)?((a)>(c)?(a):(c)):((b)>(c)?(b):(c));}
inline long long  MIN2(long long  a, long long  b){return (a)<(b)?(a):(b);}
inline long long  MIN3(long long  a, long long b,long long c){return (a)<(b)?((a)<(c)?(a):(c)):((b)<(c)?(b):(c));}
using namespace std;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector< pair<int,int> > vii;
typedef long long ll;
char rechar(int i)
{
	if(i>=0&&i<=25)
		return 'A'+i;
	if(i>=26&&i<=51)
		return 'a'+(i -26);
	if(i>=52&&i<=61)
		return '0'+(i -52);
}
int main()
{
	int ch[65]={};
	ll n,i,j,k;
	string s;
	cin>>n;
	cin>>s;
	FOR0(i,n)
	{
	      if(s[i]>='A'&&s[i]<='Z')
			  ch[s[i]-'A']++;
		  else if( s[i] >='a'&&s[i]<='z')
			  ch[26+s[i]-'a']++;
		  else
			  ch[52+s[i]-'0']++;
	}
	ll np=0;
	vll centers;
	FOR0(i,62)
	{
		if(ch[i]%2!=0)
		{
			np++;
			ch[i]--;
	        centers.pb(i);
		}
	}
	if(np==0)
	{
		cout<<1<<endl;
		string out;
		ll mid=n/2;
		FOR0(j,mid)
		{
			FOR0(k,62)
			if(ch[k]>0)
			{
				ch[k]-=2;
				out+=rechar(k);
				break;
			}
		}
		for(j=1;j+mid<=n;j++)
		{
			out+=out[mid-j];
		}
		cout<<out;
		return 0;
	}
	ll sp=(n/np);
	cout<<np<<endl;
	FOR0(i,centers.size())
	{
		ll mid = sp/2;
		string out;
        FOR0(j,mid)
		{
			FOR0(k,62)
			if(ch[k]>0)
			{
				ch[k]-=2;
				out+=rechar(k);
				break;
			}
		}
        out+=rechar(centers[i]);
        for(j=1;j+mid<sp;j++)
		{
			out+= out[mid-j];
		}
		cout<<out<<" ";
	}
}


#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<bits/stdc++.h>
#include<queue>
#define FOR0(i,n) for(i=0;i<n;i++)
#define FOR(i,j,n) for(i=j;i<n;i++)
#define FORD(i,j,k) for(i=j;i>=k;i--)
#define pb push_back
inline long long  MAX2(long long  a, long long int b){return (a)>(b)?(a):(b);}
inline long long  MAX3(long long  a, long long  b,long long  c){return (a)>(b)?((a)>(c)?(a):(c)):((b)>(c)?(b):(c));}
inline long long  MIN2(long long  a, long long  b){return (a)<(b)?(a):(b);}
inline long long  MIN3(long long  a, long long b,long long c){return (a)<(b)?((a)<(c)?(a):(c)):((b)<(c)?(b):(c));}
using namespace std;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector< pair<int,int> > vii;
typedef long long ll;
char rechar(int i)
{
	if(i>=0&&i<=25)
		return 'A'+i;
	if(i>=26&&i<=51)
		return 'a'+(i -26);
	if(i>=52&&i<=61)
		return '0'+(i -52);
}
int main()
{
	int ch[65]={};
	ll n,i,j,k;
	string s;
	cin>>n;
	cin>>s;
	FOR0(i,n)
	{
	      if(s[i]>='A'&&s[i]<='Z')
			  ch[s[i]-'A']++;
		  else if( s[i] >='a'&&s[i]<='z')
			  ch[26+s[i]-'a']++;
		  else
			  ch[52+s[i]-'0']++;
	}
	ll np=0;
	vll centers;
	FOR0(i,62)
	{
		if(ch[i]%2!=0)
		{
			np++;
			ch[i]--;
	        centers.pb(i);
		}
	}
	if(np==0)
	{
		cout<<1<<endl;
		string out;
		ll mid=n/2;
		FOR0(j,mid)
		{
			FOR0(k,62)
			if(ch[k]>0)
			{
				ch[k]-=2;
				out+=rechar(k);
				break;
			}
		}
		for(j=1;j+mid<=n;j++)
		{
			out+=out[mid-j];
		}
		cout<<out;
		return 0;
	}
	ll sp=(n/np);
	if(sp%2==0&&n%np!=0)
	{
		cout<<n<<endl;
		FOR0(i,n)
		cout<<s[i]<< " ";
		return 0;
	}
	cout<<np<<endl;
	FOR0(i,centers.size())
	{
		ll mid = sp/2;
		string out;
        FOR0(j,mid)
		{
			FOR0(k,62)
			if(ch[k]>0)
			{
				ch[k]-=2;
				out+=rechar(k);
				break;
			}
		}
        out+=rechar(centers[i]);
        for(j=1;j+mid<sp;j++)
		{
			out+= out[mid-j];
		}
		cout<<out<<" ";
	}
}


#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<bits/stdc++.h>
#include<queue>
#define FOR0(i,n) for(i=0;i<n;i++)
#define FOR(i,j,n) for(i=j;i<n;i++)
#define FORD(i,j,k) for(i=j;i>=k;i--)
#define pb push_back
inline long long  MAX2(long long  a, long long int b){return (a)>(b)?(a):(b);}
inline long long  MAX3(long long  a, long long  b,long long  c){return (a)>(b)?((a)>(c)?(a):(c)):((b)>(c)?(b):(c));}
inline long long  MIN2(long long  a, long long  b){return (a)<(b)?(a):(b);}
inline long long  MIN3(long long  a, long long b,long long c){return (a)<(b)?((a)<(c)?(a):(c)):((b)<(c)?(b):(c));}
using namespace std;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector< pair<int,int> > vii;
typedef long long ll;
char rechar(int i)
{
	if(i>=0&&i<=25)
		return 'A'+i;
	if(i>=26&&i<=51)
		return 'a'+(i -26);
	if(i>=52&&i<=61)
		return '0'+(i -52);
}
int main()
{
	int ch[65]={};
	ll n,i,j,k;
	string s;
	cin>>n;
	cin>>s;
	FOR0(i,n)
	{
	      if(s[i]>='A'&&s[i]<='Z')
			  ch[s[i]-'A']++;
		  else if( s[i] >='a'&&s[i]<='z')
			  ch[26+s[i]-'a']++;
		  else
			  ch[52+s[i]-'0']++;
	}
	ll np=0;
	vll centers;
	FOR0(i,62)
	{
		if(ch[i]%2!=0)
		{
			np++;
			ch[i]--;
	        centers.pb(i);
		}
	}
	if(np==0)
	{
		cout<<1<<endl;
		string out;
		ll mid=n/2;
		FOR0(j,mid)
		{
			FOR0(k,62)
			if(ch[k]>0)
			{
				ch[k]-=2;
				out+=rechar(k);
				break;
			}
		}
		for(j=1;j+mid<=n;j++)
		{
			out+=out[mid-j];
		}
		cout<<out;
		return 0;
	}
	if(n%np!=0&& n%2==0 && np%2==0)
	{
		while(n%np!=0)
		{
			FOR0(i,62)
		    {
			if(ch[i]>0)
			{
				centers.pb(i);
				centers.pb(i);
				ch[i]-=2;
				np+=2;
				break;
			}
		    }
		}
	}
	else if(n%np!=0)
	{
		cout<<n<<endl;
		FOR0(i,s.size())
		cout<<s[i]<<" ";
        return 0;
	}
	ll sp=(n/np);
	while(sp%2==0)
	{
		ll k = (n/sp);
		FOR0(i,62)
	    {
			int flag=0;
			while(ch[i]>0)
			{
				centers.pb(i);
				centers.pb(i);
				ch[i]-=2;
				k-=2;
				if(k==0)
				{
					flag=1;break;
				}
			}
			if(flag==1)break;
		}
		sp/=2;
	}
	np= (n/sp);
	cout<<np<<endl;
	FOR0(i,centers.size())
	{
		ll mid = sp/2;
		string out;
        FOR0(j,mid)
		{
			FOR0(k,62)
			if(ch[k]>0)
			{
				ch[k]-=2;
				out+=rechar(k);
				break;
			}
		}
        out+=rechar(centers[i]);
        for(j=1;j+mid<sp;j++)
		{
			out+= out[mid-j];
		}
		cout<<out<<" ";
	}
}


#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<bits/stdc++.h>
#include<queue>
#define FOR0(i,n) for(i=0;i<n;i++)
#define FOR(i,j,n) for(i=j;i<n;i++)
#define FORD(i,j,k) for(i=j;i>=k;i--)
#define pb push_back
inline long long  MAX2(long long  a, long long int b){return (a)>(b)?(a):(b);}
inline long long  MAX3(long long  a, long long  b,long long  c){return (a)>(b)?((a)>(c)?(a):(c)):((b)>(c)?(b):(c));}
inline long long  MIN2(long long  a, long long  b){return (a)<(b)?(a):(b);}
inline long long  MIN3(long long  a, long long b,long long c){return (a)<(b)?((a)<(c)?(a):(c)):((b)<(c)?(b):(c));}
using namespace std;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector< pair<int,int> > vii;
typedef long long ll;
char rechar(int i)
{
	if(i>=0&&i<=25)
		return 'A'+i;
	if(i>=26&&i<=51)
		return 'a'+(i -26);
	if(i>=52&&i<=61)
		return '0'+(i -52);
}
int main()
{
	int ch[65]={};
	ll n,i,j,k;
	string s;
	cin>>n;
	cin>>s;
	FOR0(i,n)
	{
	      if(s[i]>='A'&&s[i]<='Z')
			  ch[s[i]-'A']++;
		  else if( s[i] >='a'&&s[i]<='z')
			  ch[26+s[i]-'a']++;
		  else
			  ch[52+s[i]-'0']++;
	}
	vi centers;
	ll np=0;
	FOR0(i,62)
	{
		if(ch[i]%2!=0)
		{
			centers.pb(i);
			ch[i]--;
			np++;
		}
	}
	if(np==0)
	{
		cout<<n<<endl;
		ll mid=n/2;
		string out ;
		FOR0(j,mid)
		{
			FOR0(k,62)
			{
				if(ch[k]>0)
				{
					ch[k]-=2;
					out.pb(rechar(k));
					break;
				}

			}
		}
		for(j=1;j+mid<=n;j++)
		{
			out.pb(out[mid-j]);
		}
         cout<<out;
		 return 0;
	}
	while(!(n%np==0&&(n/np)%2!=0))
	{
		FOR0(i,62)
		{
			if(ch[i]>0)
			{
				centers.pb(i);
				centers.pb(i);
				ch[i]-=2;
				np+=2;
				if(n%np==0&&(n/np)%2!=0)
					break;
			}
		}
	}
	ll sp= n/np;
    cout<<np<<endl;
	FOR0(i,centers.size())
	{
		string out ;
		ll mid=sp/2;
		FOR0(j,mid)
		{
			FOR0(k,62)
			{
				if(ch[k]>0)
				{
					ch[k]-=2;
					out.pb(rechar(k));
					break;
				}

			}
		}
		out.pb(rechar(centers[i]));
		for(j=1;j+mid<sp;j++)
		{
			out.pb(out[mid-j]);
		}
         cout<<out<< " ";

	}

}


#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<bits/stdc++.h>
#include<queue>
#define FOR0(i,n) for(i=0;i<n;i++)
#define FOR(i,j,n) for(i=j;i<n;i++)
#define FORD(i,j,k) for(i=j;i>=k;i--)
#define pb push_back
inline long long  MAX2(long long  a, long long int b){return (a)>(b)?(a):(b);}
inline long long  MAX3(long long  a, long long  b,long long  c){return (a)>(b)?((a)>(c)?(a):(c)):((b)>(c)?(b):(c));}
inline long long  MIN2(long long  a, long long  b){return (a)<(b)?(a):(b);}
inline long long  MIN3(long long  a, long long b,long long c){return (a)<(b)?((a)<(c)?(a):(c)):((b)<(c)?(b):(c));}
using namespace std;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector< pair<int,int> > vii;
typedef long long ll;
char rechar(int i)
{
	if(i>=0&&i<=25)
		return 'A'+i;
	if(i>=26&&i<=51)
		return 'a'+(i -26);
	if(i>=52&&i<=61)
		return '0'+(i -52);
}
int main()
{
	int ch[65]={};
	ll n,i,j,k;
	string s;
	cin>>n;
	cin>>s;
	FOR0(i,n)
	{
	      if(s[i]>='A'&&s[i]<='Z')
			  ch[s[i]-'A']++;
		  else if( s[i] >='a'&&s[i]<='z')
			  ch[26+s[i]-'a']++;
		  else
			  ch[52+s[i]-'0']++;
	}
	vi centers;
	ll np=0;
	FOR0(i,62)
	{
		if(ch[i]%2!=0)
		{
			centers.pb(i);
			ch[i]--;
			np++;
		}
	}
	if(np==0)
	{
		cout<<1<<endl;
		ll mid=n/2;
		string out ;
		FOR0(j,mid)
		{
			FOR0(k,62)
			{
				if(ch[k]>0)
				{
					ch[k]-=2;
					out.pb(rechar(k));
					break;
				}

			}
		}
		for(j=1;j+mid<=n;j++)
		{
			out.pb(out[mid-j]);
		}
         cout<<out;
		 return 0;
	}
	while(!(n%np==0&&(n/np)%2!=0))
	{
		FOR0(i,62)
		{
			if(ch[i]>0)
			{
				centers.pb(i);
				centers.pb(i);
				ch[i]-=2;
				np+=2;
				if(n%np==0&&(n/np)%2!=0)
					break;
			}
		}
	}
	ll sp= n/np;
    cout<<np<<endl;
	FOR0(i,centers.size())
	{
		string out ;
		ll mid=sp/2;
		FOR0(j,mid)
		{
			FOR0(k,62)
			{
				if(ch[k]>0)
				{
					ch[k]-=2;
					out.pb(rechar(k));
					break;
				}

			}
		}
		out.pb(rechar(centers[i]));
		for(j=1;j+mid<sp;j++)
		{
			out.pb(out[mid-j]);
		}
         cout<<out<< " ";

	}

}


// ---- My Template start------- //
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pll pair<ll,ll>
#define pii pair<float,int>
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define a(x) scanf("%d",&x)
#define sll(x) scanf("%lld",&x)
#define pf(x) printf("%d\n",x)
#define pfl(x) printf("%lld\n",x)
#define forl(i,x,y) for(ll i=x;x<y;i++)
#define flash ios_base::sync_with_stdio(false);cin.tie(0)
#define MAX5 100005
#define MAX6 1000005
#define MLOG 18
#define limit 10e18
#define MAX 3000000000
ll power(ll x, ll y, ll p){
    ll res = 1;
    x = x % p;
    while (y > 0){
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
// ---- My Template end------- //
ll fact[2*MAX5];
ll func(){
    fact[0] = fact[1] = 1;
    for(ll i = 2; i < 200001; i++){
        fact[i] = (fact[i-1]*i)%mod;
    }
}

map <char, ll> m;
map <char, ll> m2;
map <char, ll> m3;
int main()
{
   ll n;
   string s;
   sll(n);
   cin >> s;
   n = s.size();
   //cout << n << endl;
   for(ll i = 0; i < n; i++){
        m[s[i]]++;
   }
   ll c = 0;
   ll d = 0;
   for(auto it = m.begin(); it != m.end(); it++){
        if(it->second % 2 != 0) {
                c++;
                m3[it->first] = it->second;
                if(it->second > 1){
                    m2[it->first] = it->second - 1;
                }
        }
        else{
            m2[it->first] = it->second;
            d += it->second;
        }

   }
   if(c == 0){
        cout << 1 << endl;
        string ans = "";
        string anns = "";
        for(auto it = m2.begin(); it != m2.end(); it++){
            for(ll i = 0; i < (it->second)/2; i++){
                ans += it->first;
                anns += it->first;
            }
        }
        reverse(anns.begin(),anns.end());
        ans += anns;
        cout << ans;
        return 0;
   }
   if(n%c != 0 || (n/c)%2 == 0){
        cout << n << endl;
        for(ll i = 0; i < n; i++){
            cout << s[i] << " ";
        }
   }
   else{
        ll ss = n/c;
        cout << c << endl;
        for(auto it = m3.begin(); it != m3.end(); it++){
            string ans = "";
            string anns = "";
            auto it1 = m2.begin();
            for(ll i = 0; i < ss/2; i++){
                ans += it1->first;
                anns += it1->first;
                m2[it1->first]--;
                char kk = it1->first;
                it1++;
                if(it1 == m2.end()){
                    it1 = m2.begin();
                }
                if(m2[kk] == 0){
                    m2.erase(kk);
                }
            }
            ans += it->first;
            reverse(anns.begin(),anns.end());
            it1 = m2.begin();
            ans += anns;
            for(ll i = 0; i < ss/2; i++){
                m2[it1->first]--;
                char kk = it1->first;
                it1++;
                if(it1 == m2.end()){
                    it1 = m2.begin();
                }
                if(m2[kk] == 0){
                    m2.erase(kk);
                }
            }
            cout << ans << " ";
        }
   }
}


// ---- My Template start------- //
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pll pair<ll,ll>
#define pii pair<float,int>
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define a(x) scanf("%d",&x)
#define sll(x) scanf("%lld",&x)
#define pf(x) printf("%d\n",x)
#define pfl(x) printf("%lld\n",x)
#define forl(i,x,y) for(ll i=x;x<y;i++)
#define flash ios_base::sync_with_stdio(false);cin.tie(0)
#define MAX5 100005
#define MAX6 1000005
#define MLOG 18
#define limit 10e18
#define MAX 3000000000
ll power(ll x, ll y, ll p){
    ll res = 1;
    x = x % p;
    while (y > 0){
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
// ---- My Template end------- //
ll fact[2*MAX5];
ll func(){
    fact[0] = fact[1] = 1;
    for(ll i = 2; i < 200001; i++){
        fact[i] = (fact[i-1]*i)%mod;
    }
}

map <char, ll> m;
map <char, ll> m2;
map <char, ll> m3;
int main()
{
   ll n;
   string s;
   sll(n);
   cin >> s;
   for(ll i = 0; i < n; i++){
        m[s[i]]++;
   }
   ll c = 0;
   ll d = 0;
   for(auto it = m.begin(); it != m.end(); it++){
        if(it->second % 2 != 0) {
                c++;
                m3[it->first] = it->second;
                if(it->second > 1){
                    m2[it->first] = it->second - 1;
                }
        }
        else{
            m2[it->first] = it->second;
            d += it->second;
        }

   }
   if(c == 0){
        cout << 1 << endl;
        string ans = "";
        string anns = "";
        for(auto it = m2.begin(); it != m2.end(); it++){
            for(ll i = 0; i < (it->second)/2; i++){
                ans += it->first;
                anns += it->first;
            }
        }
        reverse(anns.begin(),anns.end());
        ans += anns;
        cout << ans;
        return 0;
   }
   if(n%c != 0){
        cout << n << endl;
        for(ll i = 0; i < n; i++){
            cout << s[i] << " ";
        }
   }
   else{
        ll ss = n/c;
        cout << c << endl;
        for(auto it = m3.begin(); it != m3.end(); it++){
            string ans = "";
            string anns = "";
            auto it1 = m2.begin();
            for(ll i = 0; i < ss/2; i++){
                ans += it1->first;
                anns += it1->first;
                m2[it1->first]--;
                char kk = it1->first;
                it1++;
                if(it1 == m2.end()){
                    it1 = m2.begin();
                }
                if(m2[kk] == 0){
                    m2.erase(kk);
                }
            }
            ans += it->first;
            reverse(anns.begin(),anns.end());
            it1 = m2.begin();
            ans += anns;
            for(ll i = 0; i < ss/2; i++){
                m2[it1->first]--;
                char kk = it1->first;
                it1++;
                if(it1 == m2.end()){
                    it1 = m2.begin();
                }
                if(m2[kk] == 0){
                    m2.erase(kk);
                }
            }
            cout << ans << " ";
        }
   }
}


// ---- My Template start------- //
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pll pair<ll,ll>
#define pii pair<float,int>
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define a(x) scanf("%d",&x)
#define sll(x) scanf("%lld",&x)
#define pf(x) printf("%d\n",x)
#define pfl(x) printf("%lld\n",x)
#define forl(i,x,y) for(ll i=x;x<y;i++)
#define flash ios_base::sync_with_stdio(false);cin.tie(0)
#define MAX5 100005
#define MAX6 1000005
#define MLOG 18
#define limit 10e18
#define MAX 3000000000
ll power(ll x, ll y, ll p){
    ll res = 1;
    x = x % p;
    while (y > 0){
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
// ---- My Template end------- //
ll fact[2*MAX5];
ll func(){
    fact[0] = fact[1] = 1;
    for(ll i = 2; i < 200001; i++){
        fact[i] = (fact[i-1]*i)%mod;
    }
}

map <char, ll> m;
map <char, ll> m2;
map <char, ll> m3;
int main()
{
   ll n;
   string s;
   sll(n);
   cin >> s;
   n = s.size();
   //cout << n << endl;
   for(ll i = 0; i < n; i++){
        m[s[i]]++;
   }
   ll c = 0;
   ll d = 0;
   for(auto it = m.begin(); it != m.end(); it++){
        if(it->second % 2 != 0) {
                c++;
                m3[it->first] = it->second;
                if(it->second > 1){
                    m2[it->first] = it->second - 1;
                }
        }
        else{
            m2[it->first] = it->second;
            d += it->second;
        }
       // cout << it->second << endl;

   }
   if(c == 0){
        cout << 1 << endl;
        string ans = "";
        string anns = "";
        for(auto it = m2.begin(); it != m2.end(); it++){
            for(ll i = 0; i < (it->second)/2; i++){
                ans += it->first;
                anns += it->first;
            }
        }
        reverse(anns.begin(),anns.end());
        ans += anns;
        cout << ans;
        return 0;
   }
   //cout << c << endl;
   ll flag = 0;
   while(flag == 0){
        if(n%c == 0){
            if((n/c)%2 == 0){
                c++;
            }
            else{
                flag = 1;
            }
        }
        else{
            c++;
        }
        //cout << c;
   }
   if(c == n){
        cout << c << endl;
        for(ll i = 0; i < s.size(); i++){
            cout << s[i] << " ";
        }
        return 0;
   }
   if(1){
        ll ss = n/c;
        ll sss = (ss-1)/2;
        cout << c << endl;

        for(auto it = m3.begin(); it != m3.end(); it++){
            string ans = "";
            string anns = "";
            ll cc = 0;
            auto it1 = m2.begin();
            while(cc < ss/2){
                ll tmp = 0, f = 0;

                for(ll i = 0; (f == 0) && (i < (it1->second)/2) && (cc < ss/2); i++){
                    ans += it1->first;
                    anns += it1->first;
                    cc++;
                    tmp++;
                }
                it1->second -= 2*tmp;
                char kk = it1->first;
                it1++;
                if(it1 == m2.end()){
                    it1 = m2.begin();
                }
                if(m2[kk] == 0){
                    m2.erase(kk);
                }
            }
            ans += it->first;
            reverse(anns.begin(), anns.end());
            ans += anns;
            cout << ans << " ";
        }
        if(m2.size() > 0){
            auto it = m2.begin();
            ll tt = m3.size();
            vector < char > v;
            ll i = 0;
            while(i < c-tt){
                //cout << "k";
                ll tmp = 0;
                for(ll j = 0; j < it->second && i < c-tt; j++){
                    v.pb(it->first);
                    i++;
                    tmp++;
                   // cout << it->first << endl;
                }
                it->second -= tmp;
                it++;
                if(it == m2.end()){
                    it = m2.begin();
                }
               // cout << it->first << endl;
            }
            for(auto it = v.begin(); it != v.end(); it++){
                string ans = "";
                string anns = "";
                ll cc = 0;
                auto it1 = m2.begin();
                while(cc < ss/2){
                    ll tmp = 0, f = 0;

                    for(ll i = 0; (f == 0) && (i < (it1->second)/2) && (cc < ss/2); i++){
                        ans += it1->first;
                        anns += it1->first;
                        cc++;
                        tmp++;
                    }
                    it1->second -= 2*tmp;
                    char kk = it1->first;
                    it1++;
                    if(it1 == m2.end()){
                        it1 = m2.begin();
                    }
                    if(m2[kk] == 0){
                        m2.erase(kk);
                    }
                }
                ans += *it;
                reverse(anns.begin(), anns.end());
                ans += anns;
                cout << ans << " ";
            }

        }
   }
}


// ---- My Template start------- //
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pll pair<ll,ll>
#define pii pair<float,int>
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define a(x) scanf("%d",&x)
#define sll(x) scanf("%lld",&x)
#define pf(x) printf("%d\n",x)
#define pfl(x) printf("%lld\n",x)
#define forl(i,x,y) for(ll i=x;x<y;i++)
#define flash ios_base::sync_with_stdio(false);cin.tie(0)
#define MAX5 100005
#define MAX6 1000005
#define MLOG 18
#define limit 10e18
#define MAX 3000000000
ll power(ll x, ll y, ll p){
    ll res = 1;
    x = x % p;
    while (y > 0){
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
// ---- My Template end------- //
ll fact[2*MAX5];
ll func(){
    fact[0] = fact[1] = 1;
    for(ll i = 2; i < 200001; i++){
        fact[i] = (fact[i-1]*i)%mod;
    }
}

map <char, ll> m;
map <char, ll> m2;
map <char, ll> m3;
int main()
{
   ll n;
   string s;
   sll(n);
   cin >> s;
   n = s.size();
   //cout << n << endl;
   for(ll i = 0; i < n; i++){
        m[s[i]]++;
   }
   ll c = 0;
   ll d = 0;
   for(auto it = m.begin(); it != m.end(); it++){
        if(it->second % 2 != 0) {
                c++;
                m3[it->first] = it->second;
                if(it->second > 1){
                    m2[it->first] = it->second - 1;
                }
        }
        else{
            m2[it->first] = it->second;
            d += it->second;
        }

   }
   if(c == 0){
        cout << 1 << endl;
        string ans = "";
        string anns = "";
        for(auto it = m2.begin(); it != m2.end(); it++){
            for(ll i = 0; i < (it->second)/2; i++){
                ans += it->first;
                anns += it->first;
            }
        }
        reverse(anns.begin(),anns.end());
        ans += anns;
        cout << ans;
        return 0;
   }
   if(n%c != 0 || (n/c)%2 == 0){
        cout << n << endl;
        for(ll i = 0; i < n; i++){
            cout << s[i] << " ";
        }
   }
   else{
        ll ss = n/c;
        ll sss = (ss-1)/2;
        cout << c << endl;

        for(auto it = m3.begin(); it != m3.end(); it++){
            string ans = "";
            string anns = "";
            ll cc = 0;
            auto it1 = m2.begin();
            while(cc < ss/2){
                ll tmp = 0, f = 0;

                for(ll i = 0; (f == 0) && (i < (it1->second)/2) && (i < ss/2); i++){
                    ans += it1->first;
                    anns += it1->first;
                    cc++;
                    tmp++;
                }
                it1->second -= 2*tmp;
                char kk = it1->first;
                it1++;
                if(it1 == m2.end()){
                    it1 = m2.begin();
                }
                if(m2[kk] == 0){
                    m2.erase(kk);
                }
            }
            ans += it->first;
            reverse(anns.begin(), anns.end());
            ans += anns;
            cout << ans << " ";
        }
   }
}


// ---- My Template start------- //
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pll pair<ll,ll>
#define pii pair<float,int>
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define a(x) scanf("%d",&x)
#define sll(x) scanf("%lld",&x)
#define pf(x) printf("%d\n",x)
#define pfl(x) printf("%lld\n",x)
#define forl(i,x,y) for(ll i=x;x<y;i++)
#define flash ios_base::sync_with_stdio(false);cin.tie(0)
#define MAX5 100005
#define MAX6 1000005
#define MLOG 18
#define limit 10e18
#define MAX 3000000000
ll power(ll x, ll y, ll p){
    ll res = 1;
    x = x % p;
    while (y > 0){
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
// ---- My Template end------- //
ll fact[2*MAX5];
ll func(){
    fact[0] = fact[1] = 1;
    for(ll i = 2; i < 200001; i++){
        fact[i] = (fact[i-1]*i)%mod;
    }
}

map <char, ll> m;
map <char, ll> m2;
map <char, ll> m3;
int main()
{
   ll n;
   string s;
   sll(n);
   cin >> s;
   for(ll i = 0; i < n; i++){
        m[s[i]]++;
   }
   ll c = 0;
   ll d = 0;
   for(auto it = m.begin(); it != m.end(); it++){
        if(it->second % 2 != 0) {
                c++;
                m3[it->first] = it->second;
                if(it->second > 1){
                    m2[it->first] = it->second - 1;
                }
        }
        else{
            m2[it->first] = it->second;
            d += it->second;
        }

   }
   if(c == 0){
        cout << 1 << endl;
        string ans = "";
        string anns = "";
        for(auto it = m2.begin(); it != m2.end(); it++){
            for(ll i = 0; i < (it->second)/2; i++){
                ans += it->first;
                anns += it->first;
            }
        }
        reverse(anns.begin(),anns.end());
        ans += anns;
        cout << ans;
        return 0;
   }
   if(n%c != 0 || (n/c)%2 == 0){
        cout << n << endl;
        for(ll i = 0; i < n; i++){
            cout << s[i] << " ";
        }
   }
   else{
        ll ss = n/c;
        cout << c << endl;
        for(auto it = m3.begin(); it != m3.end(); it++){
            string ans = "";
            string anns = "";
            auto it1 = m2.begin();
            for(ll i = 0; i < ss/2; i++){
                ans += it1->first;
                anns += it1->first;
                m2[it1->first]--;
                char kk = it1->first;
                it1++;
                if(it1 == m2.end()){
                    it1 = m2.begin();
                }
                if(m2[kk] == 0){
                    m2.erase(kk);
                }
            }
            ans += it->first;
            reverse(anns.begin(),anns.end());
            it1 = m2.begin();
            ans += anns;
            for(ll i = 0; i < ss/2; i++){
                m2[it1->first]--;
                char kk = it1->first;
                it1++;
                if(it1 == m2.end()){
                    it1 = m2.begin();
                }
                if(m2[kk] == 0){
                    m2.erase(kk);
                }
            }
            cout << ans << " ";
        }
   }
}


#include <bits/stdc++.h>
#define endl '\n'

using namespace std;
template<class T> inline void chkmax(T &x, const T &y) { if(x < y) x = y; }
template<class T> inline void chkmin(T &x, const T &y) { if(x > y) x = y; }
const int MAXN = (1 << 20);

int n;
string s;

void read()
{
	cin >> n;
	cin >> s;
}

int cnt[256];

void solve()
{
	for(char c: s)
		cnt[(int)c]++;

	vector<int> odd;
	for(int i = 0; i < 256; i++)
		if(cnt[i] % 2 == 1)
			odd.push_back(i);

	for(int cn = 1; cn <= n; cn++)
		if(n % cn == 0)
		{
			int	len = n / cn;
			if(len % 2 == 0 && odd.size()) continue;
			if(cn < (int)odd.size()) continue;

			cout << cn << endl;
			while(cn--)
			{
				string ret;
				ret.resize(len);
				for(int i = 0; i < len / 2; i++)
				{
					int let = 0;
					for(int p = 0; p < 256; p++)
						if(cnt[p] >= 2)
						{
							let = p;
							cnt[p] -= 2;
							break;
						}

					ret[i] = let;
					ret[len - i - 1] = let;
				}

				if(len % 2 == 1)
				{
					int let = 0;
					if(odd.size()) let = odd.back(), odd.pop_back();
					else for(int p = 0; p < 256; p++)
						if(cnt[p] >= 1)
						{
							let = p;
							odd.push_back(p);
							continue;
						}

					ret[len / 2] = let;
				}
				cout << ret << " ";
			}

			cout << endl;
			return;
		}
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	read();
	solve();
	return 0;
}


#include <bits/stdc++.h>
#define endl '\n'

using namespace std;
template<class T> inline void chkmax(T &x, const T &y) { if(x < y) x = y; }
template<class T> inline void chkmin(T &x, const T &y) { if(x > y) x = y; }
const int MAXN = (1 << 20);

int n;
string s;

void read()
{
	cin >> n;
	cin >> s;
}

int cnt[256];

void solve()
{
	for(char c: s)
		cnt[(int)c]++;

	vector<int> odd;
	for(int i = 0; i < 256; i++)
		if(cnt[i] % 2 == 1)
			odd.push_back(i);

	for(int cn = 1; cn <= n; cn++)
		if(n % cn == 0)
		{
			int	len = n / cn;
			if(len % 2 == 0 && odd.size()) continue;
			if(cn < (int)odd.size()) continue;
			if(len % 2 == 1 && (cn - odd.size()) % 2 == 1) continue;

			cout << cn << endl;
			while(cn--)
			{
				string ret;
				ret.resize(len);
				for(int i = 0; i < len / 2; i++)
				{
					int let = -1;
					for(int p = 0; p < 256; p++)
						if(cnt[p] >= 2)
						{
							let = p;
							cnt[p] -= 2;
							break;
						}

					ret[i] = let;
					ret[len - i - 1] = let;
				}

				if(len % 2 == 1)
				{
					int let = -1;
					if(odd.size()) let = odd.back(), odd.pop_back();
					else for(int p = 0; p < 256; p++)
						if(cnt[p] >= 1)
						{
							let = p;
							odd.push_back(p);
							break;
						}

					cnt[let]--;
					ret[len / 2] = let;
				}
				cout << ret << " ";
			}

			cout << endl;
			return;
		}
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	read();
	solve();
	return 0;
}


#include <bits/stdc++.h>
#define endl '\n'

using namespace std;
template<class T> inline void chkmax(T &x, const T &y) { if(x < y) x = y; }
template<class T> inline void chkmin(T &x, const T &y) { if(x > y) x = y; }
const int MAXN = (1 << 20);

int n;
string s;

void read()
{
	cin >> n;
	cin >> s;
}

int cnt[256];

void solve()
{
	for(char c: s)
		cnt[(int)c]++;

	vector<int> odd;
	for(int i = 0; i < 256; i++)
		if(cnt[i] % 2 == 1)
			odd.push_back(i);

	for(int cn = 1; cn <= n; cn++)
		if(n % cn == 0)
		{
			int	len = n / cn;
			if(len % 2 == 0 && odd.size()) continue;
			if(cn < (int)odd.size()) continue;

			cout << cn << endl;
			while(cn--)
			{
				string ret;
				ret.resize(len);
				for(int i = 0; i < len / 2; i++)
				{
					int let = 0;
					for(int p = 0; p < 256; p++)
						if(cnt[p] >= 2)
						{
							let = p;
							cnt[p] -= 2;
							break;
						}

					ret[i] = let;
					ret[len - i - 1] = let;
				}

				if(len % 2 == 1)
				{
					int let = 0;
					if(odd.size()) let = odd.back(), odd.pop_back();
					else for(int p = 0; p < 256; p++)
						if(cnt[p] >= 1)
						{
							let = p;
							odd.push_back(p);
							continue;
						}

					cnt[let]--;
					ret[len / 2] = let;
				}
				cout << ret << " ";
			}

			cout << endl;
			return;
		}
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	read();
	solve();
	return 0;
}


#include <bits/stdc++.h>
#define endl '\n'

using namespace std;
template<class T> inline void chkmax(T &x, const T &y) { if(x < y) x = y; }
template<class T> inline void chkmin(T &x, const T &y) { if(x > y) x = y; }
const int MAXN = (1 << 20);

int n;
string s;

void read()
{
	cin >> n;
	cin >> s;
}

int cnt[256];

void solve()
{
	for(char c: s)
		cnt[(int)c]++;

	vector<int> odd;
	for(int i = 0; i < 256; i++)
		if(cnt[i] % 2 == 1)
			odd.push_back(i);

	for(int cn = 1; cn <= n; cn++)
		if(n % cn == 0)
		{
			int	len = n / cn;
			if(len % 2 == 0 && odd.size()) continue;
			if(cn < (int)odd.size()) continue;
			else if(len % 2 == 1 && (cn - odd.size()) % 2 == 1) continue;

			cout << cn << endl;
			while(cn--)
			{
				string ret;
				ret.resize(len);
				for(int i = 0; i < len / 2; i++)
				{
					int let = -1;
					for(int p = 0; p < 256; p++)
						if(cnt[p] >= 2)
						{
							let = p;
							cnt[p] -= 2;
							break;
						}

					ret[i] = let;
					ret[len - i - 1] = let;
				}

				if(len % 2 == 1)
				{
					int let = -1;
					if(odd.size()) let = odd.back(), odd.pop_back();
					else for(int p = 0; p < 256; p++)
						if(cnt[p] >= 1)
						{
							let = p;
							odd.push_back(p);
							continue;
						}

					cnt[let]--;
					ret[len / 2] = let;
				}
				cout << ret << " ";
			}

			cout << endl;
			return;
		}
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	read();
	solve();
	return 0;
}


#include <bits/stdc++.h>
#define endl '\n'

using namespace std;
template<class T> inline void chkmax(T &x, const T &y) { if(x < y) x = y; }
template<class T> inline void chkmin(T &x, const T &y) { if(x > y) x = y; }
const int MAXN = (1 << 20);

int n;
string s;

void read()
{
	cin >> n;
	cin >> s;
}

int cnt[256];

void solve()
{
	for(char c: s)
		cnt[(int)c]++;

	vector<int> odd;
	for(int i = 0; i < 256; i++)
		if(cnt[i] % 2 == 1)
			odd.push_back(i);

	for(int cn = 1; cn <= n; cn++)
		if(n % cn == 0)
		{
			int	len = n / cn;
			if(len % 2 == 0 && odd.size()) continue;
			if(cn < (int)odd.size()) continue;

			cout << cn << endl;
			while(cn--)
			{
				string ret;
				ret.resize(len);
				for(int i = 0; i < len / 2; i++)
				{
					int let = -1;
					for(int p = 0; p < 256; p++)
						if(cnt[p] >= 2)
						{
							let = p;
							cnt[p] -= 2;
							break;
						}

					assert(let != -1);

					ret[i] = let;
					ret[len - i - 1] = let;
				}

				if(len % 2 == 1)
				{
					int let = -1;
					if(odd.size()) let = odd.back(), odd.pop_back();
					else for(int p = 0; p < 256; p++)
						if(cnt[p] >= 1)
						{
							let = p;
							odd.push_back(p);
							continue;
						}

					assert(let != -1);

					cnt[let]--;
					ret[len / 2] = let;
				}
				cout << ret << " ";
			}

			cout << endl;
			return;
		}
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	read();
	solve();
	return 0;
}


#include <bits/stdc++.h>
#define endl '\n'

using namespace std;
template<class T> inline void chkmax(T &x, const T &y) { if(x < y) x = y; }
template<class T> inline void chkmin(T &x, const T &y) { if(x > y) x = y; }
const int MAXN = (1 << 20);

int n;
string s;

void read()
{
	cin >> n;
	cin >> s;
}

int cnt[256];

void solve()
{
	for(char c: s)
		cnt[(int)c]++;

	vector<int> odd;
	for(int i = 0; i < 256; i++)
		if(cnt[i] % 2 == 1)
			odd.push_back(i);

	for(int cn = 1; cn <= n; cn++)
		if(n % cn == 0)
		{
			int	len = n / cn;
			if(len % 2 == 0 && odd.size()) continue;
			if(cn < (int)odd.size()) continue;

			cout << cn << endl;
			while(cn--)
			{
				string ret;
				ret.resize(len);
				for(int i = 0; i < len / 2; i++)
				{
					int let = -1;
					for(int p = 0; p < 256; p++)
						if(cnt[p] >= 2)
						{
							let = p;
							cnt[p] -= 2;
							break;
						}

					ret[i] = let;
					ret[len - i - 1] = let;
				}

				if(len % 2 == 1)
				{
					int let = -1;
					if(odd.size()) let = odd.back(), odd.pop_back();
					else for(int p = 0; p < 256; p++)
						if(cnt[p] >= 1)
						{
							let = p;
							odd.push_back(p);
							continue;
						}

					cnt[let]--;
					ret[len / 2] = let;
				}
				cout << ret << " ";
			}

			cout << endl;
			return;
		}

	assert(0);
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	read();
	solve();
	return 0;
}


#include <bits/stdc++.h>
#define endl '\n'

using namespace std;
template<class T> inline void chkmax(T &x, const T &y) { if(x < y) x = y; }
template<class T> inline void chkmin(T &x, const T &y) { if(x > y) x = y; }
const int MAXN = (1 << 20);

int n;
string s;

void read()
{
	cin >> n;
	cin >> s;
}

int cnt[256];

void solve()
{
	for(char c: s)
		cnt[(int)c]++;

	vector<int> odd;
	for(int i = 0; i < 256; i++)
		if(cnt[i] % 2 == 1)
			odd.push_back(i);

	for(int cn = 1; cn <= n; cn++)
		if(n % cn == 0)
		{
			int	len = n / cn;
			if(len % 2 == 0 && odd.size()) continue;
			if(cn < (int)odd.size()) continue;
			else if((cn - odd.size()) % 2 == 1) continue;

			cout << cn << endl;
			while(cn--)
			{
				string ret;
				ret.resize(len);
				for(int i = 0; i < len / 2; i++)
				{
					int let = -1;
					for(int p = 0; p < 256; p++)
						if(cnt[p] >= 2)
						{
							let = p;
							cnt[p] -= 2;
							break;
						}

					ret[i] = let;
					ret[len - i - 1] = let;
				}

				if(len % 2 == 1)
				{
					int let = -1;
					if(odd.size()) let = odd.back(), odd.pop_back();
					else for(int p = 0; p < 256; p++)
						if(cnt[p] >= 1)
						{
							let = p;
							odd.push_back(p);
							continue;
						}

					cnt[let]--;
					ret[len / 2] = let;
				}
				cout << ret << " ";
			}

			cout << endl;
			return;
		}
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	read();
	solve();
	return 0;
}


#include <iostream>
#include <string>

using namespace std;

int a[150];

int main()
{
    int n;
    cin >> n;
    string s;
    cin >> s;
/*
    for (int i = 0; i < n; ++i) {
        cout << int(s[i]) << " " << char(int(s[i])) << endl;
    }
*/
    for (int i = 0; i < n; ++i) {
        a[int(s[i])] += 1;
    }
    int ans = 0;
    for (int i = 0; i < 150; ++i) {
        if (a[i] % 2 == 1) {
            ans++;
        }
    }
    if (ans == 0 && n == 0) {
        cout << 0;
        return 0;
    }
    cout << max(1, ans) << endl;
    int s1 = -1;
    int sfirst = -1;
    string l = "";
    if (ans >= 1) {
        for (int i = 0; i < 150; ++i) {
            if (a[i] % 2 == 1) {
                if (sfirst != -1) {
                    for (int j = 0; j < a[i]; ++j) {
                        cout << char(i);
                    }
                    cout << endl;
                    s1 = i;
                    //cout << string(s1 * a[s1]);
                }
                else {
                    sfirst = i;
                    l = char(sfirst);
                }
            }
        }
    }
    for (int i = 0; i < 150; ++i) {
        if (a[i] > 0 && a[i] % 2 == 0) {
            for (int j = 0; j < a[i] / 2; ++j) {
                l = char(i) + l;
            }
            for (int j = a[i] / 2; j < a[i]; ++j) {
                l = l + char(i);
            }
        }
    }
    cout << l;

    return 0;
}


#include <iostream>
#include <vector>

using namespace std;

const int mx = 256;
int n, a[mx];
vector<int> odd;

int main()
{
    ios_base::sync_with_stdio(false);
    cin >> n;
    for (int i = 0; i < n; ++i) {
        char c;
        cin >> c;
        a[c]++;
    }
    for (int i = 0; i < mx; ++i) {
        if (a[i] % 2 == 1) {
            odd.push_back(i);
            a[i] -= 1;
        }
    }
    if (odd.size() == 0) {
        vector<int> str;
        cout << 1 << '\n';
        int ptr = 0, len = n / 2;
        while (len > 0) {
            if (a[ptr] == 0)
                ptr++;
            else {
                str.push_back(ptr);
                a[ptr] -= 2;
                len -= 1;
            }
        }
        for (int i = 0; i < n / 2; ++i) {
            str.push_back(str[n / 2 - 1 - i]);
        }
        for (int i = 0; i < n; ++i) {
            cout << (char)str[i];
        }
        cout << '\n';
        return 0;
    }
    int even = n - odd.size(), odd_even, len;
    for (int k = 0; k <= even; k -= 2) {
        if ((even - k) % (2 * (k + odd.size())) == 0) {
            odd_even = k;
            len = (even - k) / (2 * (k + odd.size()));
            break;
        }
    }
    int ptr = 0;
    while (odd_even > 0) {
        if (a[ptr] == 0)
            ptr++;
        else {
            a[ptr]--;
            odd_even--;
            odd.push_back(ptr);
        }
    }
    cout << n / (2 * len + 1) << '\n';
    ptr = 0;
    for (int i = 0; i < odd.size(); ++i) {
        vector<int> str;
        int now_len = len;
        while (now_len > 0) {
            if (a[ptr] == 0)
                ptr++;
            else {
                a[ptr] -= 2;
                str.push_back(ptr);
                now_len -= 1;
            }
        }
        str.push_back(odd[i]);
        for (int j = 0; j < len; ++j) {
            str.push_back(str[len - 1 - j]);
        }
        for (int j = 0; j < 2 * len + 1; ++j) {
            cout << (char)str[j];
        }
        cout << ' ';
    }
    cout << '\n';
    return 0;
}


#include <iostream>
#include <vector>

using namespace std;

const int mx = 256;
int n, a[mx];
vector<int> odd;

int main()
{
    ios_base::sync_with_stdio(false);
    cin >> n;
    for (int i = 0; i < n; ++i) {
        char c;
        cin >> c;
        a[c]++;
    }
    for (int i = 0; i < mx; ++i) {
        if (a[i] % 2 == 1) {
            odd.push_back(i);
            a[i] -= 1;
        }
    }
    if (odd.size() == 0) {
        vector<int> str;
        cout << 1 << '\n';
        int ptr = 0, len = n / 2;
        while (len > 0) {
            if (ptr >= 256)
                break;
            if (a[ptr] <= 0)
                ptr++;
            else {
                str.push_back(ptr);
                a[ptr] -= 2;
                len -= 1;
            }
        }
        for (int i = 0; i < n / 2; ++i) {
            str.push_back(str[n / 2 - 1 - i]);
        }
        for (int i = 0; i < n; ++i) {
            cout << (char)str[i];
        }
        cout << '\n';
        return 0;
    }
    int even = n - odd.size(), odd_even, len;
    for (int k = 0; k <= even; k -= 2) {
        if ((even - k) % (2 * (k + odd.size())) == 0) {
            odd_even = k;
            len = (even - k) / (2 * (k + odd.size()));
            break;
        }
    }
    int ptr = 0;
    while (odd_even > 0) {
            if (ptr >= 256)
                break;
        if (a[ptr] <= 0)
            ptr++;
        else {
            a[ptr]--;
            odd_even--;
            odd.push_back(ptr);
        }
    }
    cout << n / (2 * len + 1) << '\n';
    ptr = 0;
    for (int i = 0; i < odd.size(); ++i) {
        vector<int> str;
        int now_len = len;
        while (now_len > 0) {
            if (ptr >= 256)
                break;
            if (a[ptr] <= 0)
                ptr++;
            else {
                a[ptr] -= 2;
                str.push_back(ptr);
                now_len -= 1;
            }
        }
        str.push_back(odd[i]);
        for (int j = 0; j < len; ++j) {
            str.push_back(str[len - 1 - j]);
        }
        for (int j = 0; j < 2 * len + 1; ++j) {
            cout << (char)str[j];
        }
        cout << ' ';
    }
    cout << '\n';
    return 0;
}


#include <iostream>
#include <vector>

using namespace std;

const int mx = 256;
int n, a[mx];
vector<int> odd;

int main()
{
    ios_base::sync_with_stdio(false);
    cin >> n;
    for (int i = 0; i < n; ++i) {
        char c;
        cin >> c;
        a[c]++;
    }
    for (int i = 0; i < mx; ++i) {
        if (a[i] % 2 == 1) {
            odd.push_back(i);
            a[i] -= 1;
        }
    }
    if (odd.size() == 0) {
        vector<int> str;
        cout << 1 << '\n';
        int ptr = 0, len = n / 2;
        while (len > 0) {
            if (a[ptr] <= 0)
                ptr++;
            else {
                str.push_back(ptr);
                a[ptr] -= 2;
                len -= 1;
            }
        }
        for (int i = 0; i < n / 2; ++i) {
            str.push_back(str[n / 2 - 1 - i]);
        }
        for (int i = 0; i < n; ++i) {
            cout << (char)str[i];
        }
        cout << '\n';
        return 0;
    }
    int even = n - odd.size(), odd_even, len;
    for (int k = 0; k <= even; k -= 2) {
        if ((even - k) % (2 * (k + odd.size())) == 0) {
            odd_even = k;
            len = (even - k) / (2 * (k + odd.size()));
            break;
        }
    }
    int ptr = 0;
    while (odd_even > 0) {
        if (a[ptr] == 0)
            ptr++;
        else {
            a[ptr]--;
            odd_even--;
            odd.push_back(ptr);
        }
    }
    cout << n / (2 * len + 1) << '\n';
    ptr = 0;
    for (int i = 0; i < odd.size(); ++i) {
        vector<int> str;
        int now_len = len;
        while (now_len > 0) {
            if (a[ptr] <= 0)
                ptr++;
            else {
                a[ptr] -= 2;
                str.push_back(ptr);
                now_len -= 1;
            }
        }
        str.push_back(odd[i]);
        for (int j = 0; j < len; ++j) {
            str.push_back(str[len - 1 - j]);
        }
        for (int j = 0; j < 2 * len + 1; ++j) {
            cout << (char)str[j];
        }
        cout << ' ';
    }
    cout << '\n';
    return 0;
}


#include <iostream>
#include <vector>

using namespace std;

const int mx = 256;
int n, a[mx];
vector<int> odd;

int main()
{
    ios_base::sync_with_stdio(false);
    cin >> n;
    for (int i = 0; i < n; ++i) {
        char c;
        cin >> c;
        a[c]++;
    }
    for (int i = 0; i < mx; ++i) {
        if (a[i] % 2 == 1) {
            odd.push_back(i);
            a[i] -= 1;
        }
    }
    if (odd.size() == 0) {
        vector<int> str;
        cout << 1 << '\n';
        int ptr = 0, len = n / 2;
        while (len > 0) {
            if (a[ptr] <= 0)
                ptr++;
            else {
                str.push_back(ptr);
                a[ptr] -= 2;
                len -= 1;
            }
        }
        for (int i = 0; i < n / 2; ++i) {
            str.push_back(str[n / 2 - 1 - i]);
        }
        for (int i = 0; i < n; ++i) {
            cout << (char)str[i];
        }
        cout << '\n';
        return 0;
    }
    int even = n - odd.size(), odd_even, len;
    for (int k = 0; k <= even; k += 2) {
        if ((even - k) % (2 * (k + odd.size())) == 0) {
            odd_even = k;
            len = (even - k) / (2 * (k + odd.size()));
            break;
        }
    }
    int ptr = 0;
    while (odd_even > 0) {
        if (a[ptr] <= 0)
            ptr++;
        else {
            a[ptr]--;
            odd_even--;
            odd.push_back(ptr);
        }
    }
    cout << n / (2 * len + 1) << '\n';
    ptr = 0;
    for (int i = 0; i < odd.size(); ++i) {
        vector<int> str;
        int now_len = len;
        while (now_len > 0) {
            if (a[ptr] <= 0)
                ptr++;
            else {
                a[ptr] -= 2;
                str.push_back(ptr);
                now_len -= 1;
            }
        }
        str.push_back(odd[i]);
        for (int j = 0; j < len; ++j) {
            str.push_back(str[len - 1 - j]);
        }
        for (int j = 0; j < 2 * len + 1; ++j) {
            cout << (char)str[j];
        }
        cout << ' ';
    }
    cout << '\n';
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int n,a[11234];
vector<char> odd;
string ans[412345];
string st;
int main(){
    cin>>n>>st;
    for(int i=0;i<n;++i){
        ++a[st[i]];
    }
    for(int i=0;i<256;++i){
        if(a[i]%2){
            odd.push_back((char)i);
            --a[i];
        }
    }
    if(!odd.size()){
        string t;
        cout<<1<<endl;
        while(1){
            bool f = false;
            for(int i=0;i<256;++i){
                if(a[i]){
                    a[i] -= 2;
                    t += (char)i;
                    f = true;
                    break;
                }
            }
            if(!f){
                break;
            }
        }
        cout<<t;
        reverse(t.begin(),t.end());
        cout<<t;
        return 0;
    }
    for(int i=n;i>0;--i){                           //  длина
        if(i%2 && n%i==0 && n/i >=odd.size()){
            cout<<n/i<<endl;
            while(n/i>odd.size()){
                for(int j='0';j<='z';++j){
                    if(a[j]>1){
                        odd.push_back((char)j);
                        odd.push_back((char)j);
                        a[j] -= 2;
                        break;
                    }
                }
            }
            for(int j=0;j<n/i;++j){
                ans[j] += odd[j];
            }
            for(int u=0;u<n/i;++u){
                for(int j=0;j<i/2;++j){
                    for(int k='0';k<='z';++k){
                        if(a[k]){
                            ans[u] = (char)k + ans[u];
                            ans[u] += (char)k;
                            a[k] -= 2;
                            break;
                        }
                    }
                }
                cout<<ans[u]<<" ";
            }
            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
int n,a[11234];
vector<char> odd;
string ans[112345];
string st;
int main(){
    cin>>n>>st;
    for(int i=0;i<n;++i){
        ++a[st[i]];
    }
    for(int i=0;i<256;++i){
        if(a[i]%2){
            odd.push_back((char)i);
            --a[i];
        }
    }
    if(!odd.size()){
        string t;
        cout<<1<<endl;
        while(1){
            bool f = false;
            for(int i=0;i<256;++i){
                if(a[i]){
                    a[i] -= 2;
                    t += (char)i;
                    f = true;
                    break;
                }
            }
            if(!f){
                break;
            }
        }
        cout<<t;
        reverse(t.begin(),t.end());
        cout<<t;
        return 0;
    }
    for(int i=n;i>0;--i){                           //  длина
        if(i%2 && n%i==0 && n/i >=odd.size()){
            cout<<n/i<<endl;
            while(n/i>odd.size()){
                for(int j=0;j<256;++j){
                    if(a[j]>1){
                        odd.push_back((char)j);
                        odd.push_back((char)j);
                        a[j] -= 2;
                        break;
                    }
                }
            }
            for(int j=0;j<n/i;++j){
                ans[j] += odd[j];
            }
            for(int u=0;u<n/i;++u){
                for(int j=0;j<i/2;++j){
                    for(int k=0;k<256;++k){
                        if(a[k]){
                            ans[u] = (char)k + ans[u];
                            ans[u] += (char)k;
                            a[k] -= 2;
                            break;
                        }
                    }
                }
                cout<<ans[u]<<" ";
            }
            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
int n,a[11234];
vector<char> odd;
string ans[412345];
string st;
vector<char> v;
int main(){
    cin>>n>>st;
    for(int i=0;i<n;++i){
        ++a[st[i]];
    }
    for(int i=0;i<256;++i){
        if(a[i]%2){
            odd.push_back((char)i);
            --a[i];
        }
        if(a[i]){
            v.push_back((char)i);
        }
    }
    if(!odd.size()){
        string t;
        cout<<1<<endl;
        while(1){
            bool f = false;
            for(int i=0;i<256;++i){
                if(a[i]){
                    a[i] -= 2;
                    t += (char)i;
                    f = true;
                    break;
                }
            }
            if(!f){
                break;
            }
        }
        cout<<t;
        reverse(t.begin(),t.end());
        cout<<t;
        return 0;
    }
    for(int i=n;i>0;--i){                           //  длина
        if(i%2 && n%i==0 && n/i >=odd.size()){
            cout<<n/i<<endl;
            while(n/i>odd.size()){
                odd.push_back(v[0]);
                odd.push_back(v[0]);
                a[v[0]] -= 2;
                if(!a[v[0]]){
                    v.erase(v.begin());
                }
            }
            for(int j=0;j<n/i;++j){
                ans[j] += odd[j];
            }
            for(int u=0;u<n/i;++u){
                for(int j=0;j<i/2;++j){
                    ans[u] = v[0] + ans[u];
                    ans[u] += v[0];
                    a[v[0]] -= 2;
                    if(!a[v[0]]){
                        v.erase(v.begin());
                    }
                }
                cout<<ans[u]<<" ";
            }
            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
int n,a[11234];
vector<char> odd;
string ans[412345];
string st;
vector<char> v;
int main(){
    cin>>n>>st;
    for(int i=0;i<n;++i)
        ++a[st[i]];
    for(int i=0;i<256;++i){
        if(a[i]%2)
            odd.push_back((char)i), --a[i];
        if(a[i])
            v.push_back((char)i);
    }
    if(odd.size()<2){
        char t[412345];
        int ind = 0;
        printf("1\n");
        for(int j=0;j<v.size();++j)
            for(int i=0;i<a[v[j]]/2;++i)
                t[ind++] = v[j];
        for(int i=0;i<ind;++i)
            printf("%c",t[i]);
        odd.size() ? printf("%c",odd[0]) : 0;
        for(int i=ind-1;i>-1;--i)
            printf("%c",t[i]);
        return 0;
    }
    for(int i=n;i>0;--i){                           //  длина
        if(i%2 && n%i==0 && n/i >=odd.size()){
            printf("%d\n",n/i);
            while(n/i>odd.size()){
                odd.push_back(v[0]);
                odd.push_back(v[0]);
                a[v[0]] -= 2;
                if(!a[v[0]]){
                    v.erase(v.begin());
                }
            }
            for(int u=0;u<n/i;++u){
                char t[412345];
                int ind = 0;
                for(int j=0;j<i/2;++j){
                    t[ind++] = v[0];
                    a[v[0]] -= 2;
                    if(!a[v[0]]){
                        v.erase(v.begin());
                    }
                }
                for(int j=0;j<ind;++j){
                    printf("%c",t[j]);
                }
                printf("%c",odd[u]);
                for(int j=ind-1;j>-1;--j){
                    printf("%c",t[j]);
                }
                printf(" ");
            }
            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
int n,a[11234];
vector<char> odd;
string ans[412345];
string st;
int main(){
    ios_base::sync_with_stdio(0);
    cin>>n>>st;
    for(int i=0;i<n;++i){
        ++a[st[i]];
    }
    for(int i=0;i<256;++i){
        if(a[i]%2){
            odd.push_back((char)i);
            --a[i];
        }
    }
    if(!odd.size()){
        string t;
        cout<<1<<endl;
        while(1){
            bool f = false;
            for(int i=0;i<256;++i){
                if(a[i]){
                    a[i] -= 2;
                    t += (char)i;
                    f = true;
                    break;
                }
            }
            if(!f){
                break;
            }
        }
        cout<<t;
        reverse(t.begin(),t.end());
        cout<<t;
        return 0;
    }
    for(int i=n;i>0;--i){                           //  длина
        if(i%2 && n%i==0 && n/i >=odd.size()){
            cout<<n/i<<endl;
            while(n/i>odd.size()){
                for(int j='0';j<='z';++j){
                    if(a[j]>1){
                        odd.push_back((char)j);
                        odd.push_back((char)j);
                        a[j] -= 2;
                        break;
                    }
                }
            }
            for(int j=0;j<n/i;++j){
                ans[j] += odd[j];
            }
            for(int u=0;u<n/i;++u){
                for(int j=0;j<i/2;++j){
                    for(int k='0';k<='z';++k){
                        if(a[k]){
                            ans[u] = (char)k + ans[u];
                            ans[u] += (char)k;
                            a[k] -= 2;
                            break;
                        }
                    }
                }
                cout<<ans[u]<<" ";
            }
            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
int n,a[11234];
vector<char> odd;
string ans[412345];
string st;
vector<char> v;
int main(){
    cin>>n>>st;
    for(int i=0;i<n;++i){
        ++a[st[i]];
    }
    for(int i=0;i<256;++i){
        if(a[i]%2){
            odd.push_back((char)i);
            --a[i];
        }
        if(a[i]){
            v.push_back((char)i);
        }
    }
    if(odd.size()<2){
        char t[412345];
        int ind = 0;
        printf("1\n");
        for(int j=0;j<v.size();++j){
            for(int i=0;i<a[v[j]]/2;++i){
                t[ind++] = v[j];
            }
        }
        for(int i=0;i<ind;++i){
            printf("%c",t[i]);
        }
        odd.size() ? printf("%c",odd[0]) : 0;
        for(int i=ind-1;i>-1;--i){
            printf("%c",t[i]);
        }
        /*cout<<t;
        reverse(t.begin(),t.end());
        cout<<t;*/
        return 0;
    }
    for(int i=n;i>0;--i){                           //  длина
        if(i%2 && n%i==0 && n/i >=odd.size()){
            cout<<n/i<<endl;
            while(n/i>odd.size()){
                odd.push_back(v[0]);
                odd.push_back(v[0]);
                a[v[0]] -= 2;
                if(!a[v[0]]){
                    v.erase(v.begin());
                }
            }
            for(int j=0;j<n/i;++j){
                ans[j] += odd[j];
            }
            for(int u=0;u<n/i;++u){
                for(int j=0;j<i/2;++j){
                    ans[u] = v[0] + ans[u];
                    ans[u] += v[0];
                    a[v[0]] -= 2;
                    if(!a[v[0]]){
                        v.erase(v.begin());
                    }
                }
                cout<<ans[u]<<" ";
            }
            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
int n,a[11234];
vector<char> odd;
string ans[412345];
string st;
vector<char> v;
int main(){
    cin>>n>>st;
    for(int i=0;i<n;++i)
        ++a[st[i]];
    for(int i=0;i<256;++i){
        if(a[i]%2){
            odd.push_back((char)i);
            --a[i];
        }
        if(a[i])
            v.push_back((char)i);
    }
    if(!odd.size()){
        string t;
        cout<<1<<endl;
        while(v.size()){
            t += v[0];
            a[v[0]] -= 2;
            if(!a[v[0]])
                v.erase(v.begin());
        }
        for(int i=0;i<t.size();++i)
            printf("%c",t[i]);
        for(int i=t.size()-1;i>-1;--i)
            printf("%c",t[i]);
        return 0;
    }
    for(int i=n;i>0;--i){
        if(i%2 && n%i==0 && n/i >=odd.size()){
            cout<<n/i<<endl;
            while(n/i>odd.size()){
                odd.push_back(v[0]);
                odd.push_back(v[0]);
                a[v[0]] -= 2;
                if(!a[v[0]])
                    v.erase(v.begin());
            }
            for(int j=0;j<n/i;++j)
                ans[j] += odd[j];
            for(int u=0;u<n/i;++u){
                for(int j=0;j<i/2;++j){
                    ans[u] = v[0] + ans[u];
                    ans[u] += v[0];
                    a[v[0]] -= 2;
                    if(!a[v[0]])
                        v.erase(v.begin());
                }
                cout<<ans[u]<<" ";
            }
            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
int n,a[11234];
vector<char> odd;
string ans[412345];
string st;
vector<char> v;
int main(){
    cin>>n>>st;
    for(int i=0;i<n;++i){
        ++a[st[i]];
    }
    for(int i=0;i<256;++i){
        if(a[i]%2){
            odd.push_back((char)i);
            --a[i];
        }
        if(a[i]){
            v.push_back((char)i);
        }
    }
    if(!odd.size()){
        string t;
        cout<<1<<endl;
        while(v.size()){
            t += v[0];
            a[v[0]] -= 2;
            if(!a[v[0]]){
                v.erase(v.begin());
            }
        }
        cout<<t;
        reverse(t.begin(),t.end());
        cout<<t;
        return 0;
    }
    for(int i=n;i>0;--i){                           //  длина
        if(i%2 && n%i==0 && n/i >=odd.size()){
            cout<<n/i<<endl;
            while(n/i>odd.size()){
                odd.push_back(v[0]);
                odd.push_back(v[0]);
                a[v[0]] -= 2;
                if(!a[v[0]]){
                    v.erase(v.begin());
                }
            }
            for(int j=0;j<n/i;++j){
                ans[j] += odd[j];
            }
            for(int u=0;u<n/i;++u){
                for(int j=0;j<i/2;++j){
                    ans[u] = v[0] + ans[u];
                    ans[u] += v[0];
                    a[v[0]] -= 2;
                    if(!a[v[0]]){
                        v.erase(v.begin());
                    }
                }
                cout<<ans[u]<<" ";
            }
            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
int n,a[11234];
vector<char> odd;
string ans[412345];
string st;
vector<char> v;
int main(){
    cin>>n>>st;
    for(int i=0;i<n;++i){
        ++a[st[i]];
    }
    for(int i=0;i<256;++i){
        if(a[i]%2){
            odd.push_back((char)i);
            --a[i];
        }
        if(a[i]){
            v.push_back((char)i);
        }
    }
    if(!odd.size()){
        string t;
        printf("1\n");
        for(int j=0;j<v.size();++j)
            for(int i=0;i<a[v[j]]/2;++i)
                t += v[j];
        for(int i=0;i<t.size();++i)
            printf("%c",t[i]);
        for(int i=t.size()-1;i>-1;--i)
            printf("%c",t[i]);
        return 0;
    }
    for(int i=n;i>0;--i){                           //  длина
        if(i%2 && n%i==0 && n/i >=odd.size()){
            cout<<n/i<<endl;
            while(n/i>odd.size()){
                odd.push_back(v[0]);
                odd.push_back(v[0]);
                a[v[0]] -= 2;
                if(!a[v[0]]){
                    v.erase(v.begin());
                }
            }
            for(int j=0;j<n/i;++j)
                ans[j] += odd[j];
            for(int u=0;u<n/i;++u){
                for(int j=0;j<i/2;++j){
                    ans[u] = v[0] + ans[u];
                    ans[u] += v[0];
                    a[v[0]] -= 2;
                    if(!a[v[0]]){
                        v.erase(v.begin());
                    }
                }
                cout<<ans[u]<<" ";
            }
            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
int n,a[11234];
vector<char> odd;
string ans[412345];
string st;
vector<char> v;
int main(){
    cin>>n>>st;
    for(int i=0;i<n;++i){
        ++a[st[i]];
    }
    for(int i=0;i<256;++i){
        if(a[i]%2){
            odd.push_back((char)i);
            --a[i];
        }
        if(a[i]){
            v.push_back((char)i);
        }
    }
    if(odd.size()<2){
        char t[412345];
        int ind = 0;
        printf("1\n");
        for(int j=0;j<v.size();++j)
            for(int i=0;i<a[v[j]]/2;++i)
                t[ind++] = v[j];
        for(int i=0;i<ind;++i)
            printf("%c",t[i]);
        printf("%c",odd[0]);
        for(int i=ind-1;i>-1;--i)
            printf("%c",t[i]);
        return 0;
    }
    for(int i=n;i>0;--i){                           //  длина
        if(i%2 && n%i==0 && n/i >=odd.size()){
            cout<<n/i<<endl;
            while(n/i>odd.size()){
                odd.push_back(v[0]);
                odd.push_back(v[0]);
                a[v[0]] -= 2;
                if(!a[v[0]]){
                    v.erase(v.begin());
                }
            }
            for(int j=0;j<n/i;++j){
                ans[j] += odd[j];
            }
            for(int u=0;u<n/i;++u){
                for(int j=0;j<i/2;++j){
                    ans[u] = v[0] + ans[u];
                    ans[u] += v[0];
                    a[v[0]] -= 2;
                    if(!a[v[0]]){
                        v.erase(v.begin());
                    }
                }
                cout<<ans[u]<<" ";
            }
            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
int n,a[11234];
vector<char> odd;
string ans[412345];
string st;
vector<char> v;
int main(){
    cin>>n>>st;
    for(int i=0;i<n;++i){
        ++a[st[i]];
    }
    for(int i=0;i<256;++i){
        if(a[i]%2){
            odd.push_back((char)i);
            --a[i];
        }
        if(a[i]){
            v.push_back((char)i);
        }
    }
    if(!odd.size()){
        char t[412345];
        int ind = 0;
        printf("1\n");
        for(int j=0;j<v.size();++j){
            for(int i=0;i<a[v[j]]/2;++i){
                t[ind++] = v[j];
            }
        }
        for(int i=0;i<ind;++i){
            printf("%c",t[i]);
        }
        for(int i=ind-1;i>-1;--i){
            printf("%c",t[i]);
        }
        /*cout<<t;
        reverse(t.begin(),t.end());
        cout<<t;*/
        return 0;
    }
    for(int i=n;i>0;--i){                           //  длина
        if(i%2 && n%i==0 && n/i >=odd.size()){
            cout<<n/i<<endl;
            while(n/i>odd.size()){
                odd.push_back(v[0]);
                odd.push_back(v[0]);
                a[v[0]] -= 2;
                if(!a[v[0]]){
                    v.erase(v.begin());
                }
            }
            for(int j=0;j<n/i;++j){
                ans[j] += odd[j];
            }
            for(int u=0;u<n/i;++u){
                for(int j=0;j<i/2;++j){
                    ans[u] = v[0] + ans[u];
                    ans[u] += v[0];
                    a[v[0]] -= 2;
                    if(!a[v[0]]){
                        v.erase(v.begin());
                    }
                }
                cout<<ans[u]<<" ";
            }
            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
int n,a[11234];
vector<char> odd;
string ans[412345];
string st;
int main(){
    cin>>n>>st;
    for(int i=0;i<n;++i){
        ++a[st[i]];
    }
    for(int i=0;i<256;++i){
        if(a[i]%2){
            odd.push_back((char)i);
            --a[i];
        }
    }
    if(!odd.size()){
        string t;
        cout<<1<<endl;
        while(1){
            bool f = false;
            for(int i=0;i<256;++i){
                if(a[i]){
                    a[i] -= 2;
                    t += (char)i;
                    f = true;
                    break;
                }
            }
            if(!f){
                break;
            }
        }
        cout<<t;
        reverse(t.begin(),t.end());
        cout<<t;
        return 0;
    }
    for(int i=n;i>0;--i){                           //  длина
        if(i%2 && n%i==0 && n/i >=odd.size()){
            cout<<n/i<<endl;
            while(n/i>odd.size()){
                for(int j=0;j<256;++j){
                    if(a[j]>1){
                        odd.push_back((char)j);
                        odd.push_back((char)j);
                        a[j] -= 2;
                        break;
                    }
                }
            }
            for(int j=0;j<n/i;++j){
                ans[j] += odd[j];
            }
            for(int u=0;u<n/i;++u){
                for(int j=0;j<i/2;++j){
                    for(int k=0;k<256;++k){
                        if(a[k]){
                            ans[u] = (char)k + ans[u];
                            ans[u] += (char)k;
                            a[k] -= 2;
                            break;
                        }
                    }
                }
                cout<<ans[u]<<" ";
            }
            return 0;
        }
    }
}


//Problem A will go here
 /*
 Problem name :
 Algorithm : Not Sure Yet
 Contest/Practice :
 Source :
 Comment : Whenever you start to believe  yourself, people also start to believe in you
 Date : --
 Last Update : 25-Mar-2015
*/

#include<bits/stdc++.h>

#define pause           system("pause");
#define FOR(s,e,inc)    for(int i=s;i<=e;i+=inc)
#define mod             1000000007
#define UNIQUE(V) (V).erase(unique((V).begin(),(V).end()),(V).end())//vector must be sorted
#define inf             1<<30
#define pb              push_back
#define ppb             pop_back
#define mp              make_pair
#define F               first
#define S               second
#define sz(x)           ((int)x.size())
#define sqr(x)          ( (x)* (x) )
#define eps             1e-9
#define lcm(x,y)        (abs(x) /gcd(x,y))* abs(y)
#define on(x,w)         x|(1<<w)
#define check(x,w)      (x&(1<<w))
#define all(x)          (x).begin(),(x).end()
#define pf              printf
#define sf              scanf
#define pi              acos(-1.0)
#define reset(x,v)      memset(x,v,sizeof(x));
#define AND             &&
#define OR              ||
#define what_is(x)      cerr<<#x<<" is "<<x<<"\n";

typedef long long ll;
typedef unsigned long long llu;

using namespace std;

template<class T>
inline T mod_v(T num)
{
    if(num>=0)
        return num%mod;
    else
        return (num%mod+mod)%mod;
}
template<class T>
inline T gcd(T a,T b)
{
    a=abs(a);
    b=abs(b);

    while(b) b ^= a ^= b ^= a %= b;
    return a;
}

template<class T>
T fast_pow(T n , T p)
{
    if(p==0) return 1;
    if(p%2)
    {
        T g=mod_v ( mod_v(n) * mod_v(fast_pow(n,p-1)) );
        return g;
    }
    else
    {
        T g=fast_pow(n,p/2);
        g=mod_v( mod_v(g) * mod_v(g) ) ;
        return g;
    }
}

template<class T>
inline T modInverse(T n)
{
    return fast_pow(n,mod-2);
}

bool equalTo ( double a, double b ){ if ( fabs ( a - b ) <= eps ) return true; else return false; }
bool notEqual ( double a, double b ){if ( fabs ( a - b ) > eps ) return true; else return false; }
bool lessThan ( double a, double b ){ if ( a + eps < b ) return true; else return false; }
bool lessThanEqual ( double a, double b ){if ( a < b + eps ) return true;   else return false;}
bool greaterThan ( double a, double b ){if ( a > b + eps ) return true;else return false;}
bool greaterThanEqual ( double a, double b ){if ( a + eps > b ) return true;else return false;}

#define debug(args...) {dbg,args; cerr<<endl;}

struct debugger{
    template<typename T> debugger& operator , (const T& v){
        cerr<<v<<" ";
        return *this;
    }
}dbg;

int nextInt() { int n; scanf("%d", &n); return n; }
long long nextLong() { long long n; scanf("%lld", &n); return n; }
void print(int n){ printf("%d", n); }
void println(int n){ printf("%d\n", n); }
void println(long long n){ printf("%lld\n", n); }

template<class T>
inline int in(register T& num)
{
    register char c=0;
    num=0;
    bool n=false;
    while(c<33)c=getchar();
    while(c>33){
        if(c=='-')
            n=true;
        else num=num*10+c-'0';
        c=getchar();
    }
    num=n?-num:num;
    return 1;
}

/******* ! Code start from here ! *******/

int cnt[4*100005][102];
int tmp[65];

int value(char ch){
    if('a'<=ch and ch<='z' )
        return ch-'a';
    else if('A'<=ch and ch<='Z' )
        return 26+ ch-'A';

    return 2*26 + ch-'0';
}

char i_value(int v){
    if(0<=v and v<=25)
        return 'a'+v;

    else if(26<=v and v<=51 )
        return  v-26+'A';

    return v-2*26+'0';
}

string palindrom(string s){

    reset(tmp,0);

    int idx = -1;

    for(auto i:s){
        tmp[value(i) ]++;

    }

    string pal ;

    for(int i=0;i<62;i++){
        if(tmp[i]%2)
            idx = i;

        for(int j=0;j<tmp[i]/2;j++)
            pal.pb(i_value(i) );
    }

    string ss = pal;

    reverse(all(ss) );

    if(idx!=-1)
        pal.pb(i_value(idx) );

    pal+=ss;

    return pal;

}

int main()
{
//     std::ios_base::sync_with_stdio(false);

    #ifdef kimbbakar
        freopen ( "E:/Code/in.txt", "r", stdin );
       // freopen ( "E:/Code/out.txt", "w", stdout );
    #endif

    string s;
    int ln ;
    in(ln);

    cin>>s;

    for(int i=0;i<sz(s);i++){
        cnt[i][value(s[i] )]++;
        for(int j=0;j<62 and i;j++ )
            cnt[i][j]+=cnt[i-1][j];
    }

    vector<string>res;

    for(int i=1;i<=sz(s);i++ ){
        if(ln%i==0){
            int dis = ln/i;

            bool ok=true;

            for(int j=0;j<sz(s) and ok;j+=dis ){
                int even = 0,odd = 0;

                for(int k=0;k<62;k++){
                    int c = cnt[j+dis-1][k];

                    if(j)
                        c-=cnt[j-1][k];

                    if(c%2)
                        odd++;
                    else even++;
                }

                if(odd>1)
                    ok=false;
            }

            if(ok){

                for(int j=0;j<sz(s);j+=dis ){

                    string ss = palindrom(s.substr(j,dis) );

                    res.pb(ss);
                }

                break;
            }
        }
    }

    pf("%d\n",sz(res));

    for(int i=0;i<sz(res);i++){
        if(i)
            pf(" ");

        cout<<res[i];
    }

    return 0;
}


//Problem A will go here
 /*
 Problem name :
 Algorithm : Not Sure Yet
 Contest/Practice :
 Source :
 Comment : Whenever you start to believe  yourself, people also start to believe in you
 Date : --
 Last Update : 25-Mar-2015
*/

#include<bits/stdc++.h>

#define pause           system("pause");
#define FOR(s,e,inc)    for(int i=s;i<=e;i+=inc)
#define mod             1000000007
#define UNIQUE(V) (V).erase(unique((V).begin(),(V).end()),(V).end())//vector must be sorted
#define inf             1<<30
#define pb              push_back
#define ppb             pop_back
#define mp              make_pair
#define F               first
#define S               second
#define sz(x)           ((int)x.size())
#define sqr(x)          ( (x)* (x) )
#define eps             1e-9
#define lcm(x,y)        (abs(x) /gcd(x,y))* abs(y)
#define on(x,w)         x|(1<<w)
#define check(x,w)      (x&(1<<w))
#define all(x)          (x).begin(),(x).end()
#define pf              printf
#define sf              scanf
#define pi              acos(-1.0)
#define reset(x,v)      memset(x,v,sizeof(x));
#define AND             &&
#define OR              ||
#define what_is(x)      cerr<<#x<<" is "<<x<<"\n";

typedef long long ll;
typedef unsigned long long llu;

using namespace std;

template<class T>
inline T mod_v(T num)
{
    if(num>=0)
        return num%mod;
    else
        return (num%mod+mod)%mod;
}
template<class T>
inline T gcd(T a,T b)
{
    a=abs(a);
    b=abs(b);

    while(b) b ^= a ^= b ^= a %= b;
    return a;
}

template<class T>
T fast_pow(T n , T p)
{
    if(p==0) return 1;
    if(p%2)
    {
        T g=mod_v ( mod_v(n) * mod_v(fast_pow(n,p-1)) );
        return g;
    }
    else
    {
        T g=fast_pow(n,p/2);
        g=mod_v( mod_v(g) * mod_v(g) ) ;
        return g;
    }
}

template<class T>
inline T modInverse(T n)
{
    return fast_pow(n,mod-2);
}

bool equalTo ( double a, double b ){ if ( fabs ( a - b ) <= eps ) return true; else return false; }
bool notEqual ( double a, double b ){if ( fabs ( a - b ) > eps ) return true; else return false; }
bool lessThan ( double a, double b ){ if ( a + eps < b ) return true; else return false; }
bool lessThanEqual ( double a, double b ){if ( a < b + eps ) return true;   else return false;}
bool greaterThan ( double a, double b ){if ( a > b + eps ) return true;else return false;}
bool greaterThanEqual ( double a, double b ){if ( a + eps > b ) return true;else return false;}

#define debug(args...) {dbg,args; cerr<<endl;}

struct debugger{
    template<typename T> debugger& operator , (const T& v){
        cerr<<v<<" ";
        return *this;
    }
}dbg;

int nextInt() { int n; scanf("%d", &n); return n; }
long long nextLong() { long long n; scanf("%lld", &n); return n; }
void print(int n){ printf("%d", n); }
void println(int n){ printf("%d\n", n); }
void println(long long n){ printf("%lld\n", n); }

template<class T>
inline int in(register T& num)
{
    register char c=0;
    num=0;
    bool n=false;
    while(c<33)c=getchar();
    while(c>33){
        if(c=='-')
            n=true;
        else num=num*10+c-'0';
        c=getchar();
    }
    num=n?-num:num;
    return 1;
}

/******* ! Code start from here ! *******/

int cnt[4*100005][102];
int tmp[65];

int value(char ch){
    if('a'<=ch and ch<='z' )
        return ch-'a';
    else if('A'<=ch and ch<='Z' )
        return 26+ ch-'A';

    return 2*26 + ch-'0';
}

char i_value(int v){
    if(0<=v and v<=25)
        return 'a'+v;

    else if(26<=v and v<=51 )
        return  v-26+'A';

    return v-2*26+'0';
}

string palindrom(string s){

    reset(tmp,0);

    int idx = -1;

    for(auto i:s){
        tmp[value(i) ]++;

    }

    string pal ;

    for(int i=0;i<62;i++){
        if(tmp[i]%2)
            idx = i;

        for(int j=0;j<tmp[i]/2;j++)
            pal.pb(i_value(i) );
    }

    string ss = pal;

    reverse(all(ss) );

    if(idx!=-1)
        pal.pb(i_value(idx) );

    pal+=ss;

    return pal;

}

int main()
{
//     std::ios_base::sync_with_stdio(false);

    #ifdef kimbbakar
        freopen ( "E:/Code/in.txt", "r", stdin );
       // freopen ( "E:/Code/out.txt", "w", stdout );
    #endif

    string s;
    int ln ;
    in(ln);

    cin>>s;

    for(int i=0;i<sz(s);i++){
        cnt[i][value(s[i] )]++;
        for(int j=0;j<62;j++ )
            cnt[i][j]+=cnt[i-1][j];
    }

    vector<string>res;

    for(int i=1;i<=sz(s);i++ ){
        if(ln%i==0){
            int dis = ln/i;

            bool ok=true;

            for(int j=0;j<sz(s) and ok;j+=dis ){
                int even = 0,odd = 0;

                for(int k=0;k<62;k++){
                    int c = cnt[j+dis-1][k];

                    if(j)
                        c-=cnt[j-1][k];

                    if(c%2)
                        odd++;
                    else even++;
                }

                if(odd>1)
                    ok=false;
            }

            if(ok){

                for(int j=0;j<sz(s);j+=dis ){

                    string ss = palindrom(s.substr(j,dis) );

                    res.pb(ss);
                }

                break;
            }
        }
    }

    pf("%d\n",sz(res));

    for(int i=0;i<sz(res);i++){
        if(i)
            pf(" ");

        cout<<res[i];
    }

    return 0;
}


//Problem A will go here
 /*
 Problem name :
 Algorithm : Not Sure Yet
 Contest/Practice :
 Source :
 Comment : Whenever you start to believe  yourself, people also start to believe in you
 Date : --
 Last Update : 25-Mar-2015
*/

#include<bits/stdc++.h>

#define pause           system("pause");
#define FOR(s,e,inc)    for(int i=s;i<=e;i+=inc)
#define mod             1000000007
#define UNIQUE(V) (V).erase(unique((V).begin(),(V).end()),(V).end())//vector must be sorted
#define inf             1<<30
#define pb              push_back
#define ppb             pop_back
#define mp              make_pair
#define F               first
#define S               second
#define sz(x)           ((int)x.size())
#define sqr(x)          ( (x)* (x) )
#define eps             1e-9
#define lcm(x,y)        (abs(x) /gcd(x,y))* abs(y)
#define on(x,w)         x|(1<<w)
#define check(x,w)      (x&(1<<w))
#define all(x)          (x).begin(),(x).end()
#define pf              printf
#define sf              scanf
#define pi              acos(-1.0)
#define reset(x,v)      memset(x,v,sizeof(x));
#define AND             &&
#define OR              ||
#define what_is(x)      cerr<<#x<<" is "<<x<<"\n";

typedef long long ll;
typedef unsigned long long llu;

using namespace std;

template<class T>
inline T mod_v(T num)
{
    if(num>=0)
        return num%mod;
    else
        return (num%mod+mod)%mod;
}
template<class T>
inline T gcd(T a,T b)
{
    a=abs(a);
    b=abs(b);

    while(b) b ^= a ^= b ^= a %= b;
    return a;
}

template<class T>
T fast_pow(T n , T p)
{
    if(p==0) return 1;
    if(p%2)
    {
        T g=mod_v ( mod_v(n) * mod_v(fast_pow(n,p-1)) );
        return g;
    }
    else
    {
        T g=fast_pow(n,p/2);
        g=mod_v( mod_v(g) * mod_v(g) ) ;
        return g;
    }
}

template<class T>
inline T modInverse(T n)
{
    return fast_pow(n,mod-2);
}

bool equalTo ( double a, double b ){ if ( fabs ( a - b ) <= eps ) return true; else return false; }
bool notEqual ( double a, double b ){if ( fabs ( a - b ) > eps ) return true; else return false; }
bool lessThan ( double a, double b ){ if ( a + eps < b ) return true; else return false; }
bool lessThanEqual ( double a, double b ){if ( a < b + eps ) return true;   else return false;}
bool greaterThan ( double a, double b ){if ( a > b + eps ) return true;else return false;}
bool greaterThanEqual ( double a, double b ){if ( a + eps > b ) return true;else return false;}

#define debug(args...) {dbg,args; cerr<<endl;}

struct debugger{
    template<typename T> debugger& operator , (const T& v){
        cerr<<v<<" ";
        return *this;
    }
}dbg;

int nextInt() { int n; scanf("%d", &n); return n; }
long long nextLong() { long long n; scanf("%lld", &n); return n; }
void print(int n){ printf("%d", n); }
void println(int n){ printf("%d\n", n); }
void println(long long n){ printf("%lld\n", n); }

template<class T>
inline int in(register T& num)
{
    register char c=0;
    num=0;
    bool n=false;
    while(c<33)c=getchar();
    while(c>33){
        if(c=='-')
            n=true;
        else num=num*10+c-'0';
        c=getchar();
    }
    num=n?-num:num;
    return 1;
}

/******* ! Code start from here ! *******/

int cnt [102];
int tmp[65];

int value(char ch){
    if('a'<=ch and ch<='z' )
        return ch-'a';
    else if('A'<=ch and ch<='Z' )
        return 26+ ch-'A';

    return 2*26 + ch-'0';
}

char i_value(int v){
    if(0<=v and v<=25)
        return 'a'+v;

    else if(26<=v and v<=51 )
        return  v-26+'A';

    return v-2*26+'0';
}

string palindrom(string s){

    reset(tmp,0);

    int idx = -1;

    for(auto i:s){
        tmp[value(i) ]++;

    }

    string pal ;

    for(int i=0;i<62;i++){
        if(tmp[i]%2)
            idx = i;

        for(int j=0;j<tmp[i]/2;j++)
            pal.pb(i_value(i) );
    }

    string ss = pal;

    reverse(all(ss) );

    if(idx!=-1)
        pal.pb(i_value(idx) );

    pal+=ss;

    return pal;

}

vector<char>odd;

int main()
{
//     std::ios_base::sync_with_stdio(false);

    #ifdef kimbbakar
        freopen ( "E:/Code/in.txt", "r", stdin );
       // freopen ( "E:/Code/out.txt", "w", stdout );
    #endif

    string s;
    int ln ;
    in(ln);

    cin>>s;

    for(int i=0;i<sz(s);i++){
        cnt[value(s[i] )]++;
    }

    for(int i=0;i<62 ;i++ ) {
        if(cnt[i]%2 ){
            cnt[i]--;
            odd.pb(i_value(i) );
        }
    }

    if(sz(odd)==0){
        pf("1\n" );
        cout<<palindrom(s);

    }
    else{

        int j=0;
        while(!((ln-sz(odd) )%sz(odd)==0 and ((ln-sz(odd) )/sz(odd) )%2==0 ) ){
            if(cnt[j]){
                cnt[j]-=2;
                odd.pb(i_value(j) );
                odd.pb(i_value(j) );
            }
            else j++;
        }

        pf("%d\n",sz(odd) );

        int dis = (ln-sz(odd) )/sz(odd);

        for(auto i:odd){
            string tmp;
             tmp.pb(i);

             dis = (ln-sz(odd) )/sz(odd);

             while(dis){
                if(cnt[j]){
                    tmp.pb(i_value(j) );
                    dis--;
                    cnt[j]--;
                }
                else j++;
             }

             pf("%s ",palindrom(tmp).c_str() );
        }

    }

    return 0;
}