//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];
    }

    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){
                pf("%d\n",i);

                for(int j=0;j<sz(s);j+=dis ){
                    cout<< palindrom(s.substr(j,dis) ) ;

                    if(j+dis<sz(s))
                        pf(" ");
                    else pf("\n");
                }

                break;
            }
        }
    }

    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];
    }

    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){
                pf("%d\n",i);

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

                    string ss = palindrom(s.substr(j,dis) );
                    for(auto k: ss)
                        pf("%c",k);

                    if(j+dis<sz(s))
                        pf(" ");
                    else pf("\n");
                }

                break;
            }
        }
    }

    return 0;
}


#include <bits/stdc++.h>

#define pf push_front
#define INF 1e9+7
#define pf2 pop_front
#define pb2 pop_back
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define sz size
#define eps 1e-7
#define fod find_by_order
#define fastio ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
#define ofk order_of_key
#define val(x) cout << "Value dari "<< #x << " adalah " << x  << "\n"
#define tr tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
typedef long long ll;
using namespace std;

int dx[8] = {1,0,-1,0,1,1,-1,-1};
int dy[8] = {0,1,0,-1,1,-1,1,-1};

void readf(string x){
	freopen((x+".in").c_str(),"r",stdin);
	freopen((x+".out").c_str(),"w",stdout);
}

void pr(string x){
	freopen((x+".in").c_str(),"w",stdout);
}

int read()
{
	bool min = 0;
	int  result = 0;
	char ch;
	ch = getchar();
	while(1)
	{
		if(ch == '-') break;
		if(ch >='0' && ch <= '9') break;
		ch = getchar();
	}
	if(ch == '-') min = 1;else result = ch-'0';
	while(1)
	{
		ch =getchar();
		if(ch< '0' || ch>'9') break;
		result = result * 10 + (ch-'0');
	}
	if(min) return -result;
	return result;
}
//Reynaldo's Template

int main(){
	fastio
	int N;
	cin >> N;
	string x;
	cin >> x;
	sort(x.begin(),x.end());
	vector<pair<char,int> >v;
	v.pb({x[0],1});
	for(int i=1;i<x.size();i++){
		if(x[i] == (v.back()).fi) {
			(v.back()).se++;
		}
		else {
			v.pb({x[i],1});
		}
	}
	deque<char> dq;
	int ganjil = 0,genap = 0;
	for(int i=0;i<v.size();i++){
		char a = v[i].fi;
		int b  = v[i].se;
		ganjil += b%2;
		genap += (b/2*2);
		for(int j=0;j<b%2;j++) dq.pb(a);
		for(int j=0;j<b/2*2;j++) dq.push_front(a);
	}
	//if(N == 4*1e5) assert(0);
	for(int i=1;i<=N;i++){
		if(N % i != 0) continue;
		int a = N/i;
		if(a % 2 == 0){
			if(ganjil == 0){
				cout << i << "\n";
				for(int j=0;j<i;j++){
					deque<char> tmp;
					if(j != 0) cout << " ";
					for(int k=0;k<a/2;k++){
				//		cout << dq.front();t
						tmp.pb(dq.front());
				//		tmp = tmp + dq.front();
						dq.pop_front();
						tmp.pf(dq.front());
					//	tmp = dq.front() + tmp;
						dq.pop_front();
					}
					cout << tmp;
				}
				while(!dq.empty()){
					cout << dq.front();
					dq.pop_front();
				}
				cout << "\n";
				return 0;
			}
			else continue;
		}
		else{
			if(ganjil <= i){
				cout << i << "\n";
				for(int j=0;j<i;j++){
					deque<char> dq;
					if(j != 0) cout << " ";
					tmp.pb(dq.back());
		//			tmp = tmp + dq.back();
					dq.pop_back();
					for(int k=0;k<a/2;k++){
					//	tmp = tmp + dq.front();
						tmp.pb(dq.front());
						dq.pop_front();
						tmp.pf(dq.front());
					//	tmp = dq.front() + tmp;
						dq.pop_front();
					}
					cout << tmp;
				}
				while(!dq.empty()){
					cout << dq.front();
					dq.pop_front();
				}
				cout << "\n";
				return 0;
			}
			else continue;
		}
	}
}


#include <bits/stdc++.h>

#define INF 1e9+7
#define pf2 pop_front
#define pb2 pop_back
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define sz size
#define eps 1e-7
#define fod find_by_order
#define fastio ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
#define ofk order_of_key
#define val(x) cout << "Value dari "<< #x << " adalah " << x  << "\n"
#define tr tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
typedef long long ll;
using namespace std;

int dx[8] = {1,0,-1,0,1,1,-1,-1};
int dy[8] = {0,1,0,-1,1,-1,1,-1};

void readf(string x){
	freopen((x+".in").c_str(),"r",stdin);
	freopen((x+".out").c_str(),"w",stdout);
}

void pr(string x){
	freopen((x+".in").c_str(),"w",stdout);
}

int read()
{
	bool min = 0;
	int  result = 0;
	char ch;
	ch = getchar();
	while(1)
	{
		if(ch == '-') break;
		if(ch >='0' && ch <= '9') break;
		ch = getchar();
	}
	if(ch == '-') min = 1;else result = ch-'0';
	while(1)
	{
		ch =getchar();
		if(ch< '0' || ch>'9') break;
		result = result * 10 + (ch-'0');
	}
	if(min) return -result;
	return result;
}
//Reynaldo's Template

int main(){
	int N;
	cin >> N;
	string x;
	cin >> x;
	map<char,int> mp;
	for(int i=0;i<N;i++){
		mp[x[i]]++;
	}
	vector<pair<int,int> > v;
	deque<char> dq;
	int ganjil = 0,genap = 0;
	for(map<char,int>::iterator it=mp.begin();it!=mp.end();it++){
		v.pb({it->first,it->second});
		char a = it->first;
		int b = it->second;
		if(b % 2 == 1)
		{
			ganjil++;
			dq.pb(a);
		}
		for(int j=0;j<b/2*2;j++) dq.push_front(a);
		genap =  genap + b/2;
	}
	for(int i=1;i<=N;i++){
		if(N % i != 0) continue;
		int a = N/i;
		if(a % 2 == 0){
			if(ganjil == 0){
				cout << i << "\n";
				for(int j=0;j<i;j++){
					string tmp = "";
					if(j != 0) cout << " ";
					for(int k=0;k<a/2;k++){
				//		cout << dq.front();
						tmp = tmp + dq.front();
						dq.pop_front();
						tmp = dq.front() + tmp;
						dq.pop_front();
					}
					cout << tmp;
				}
				cout << "\n";
				return 0;
			}
			else continue;
		}
		else{
			if(ganjil <= i){
				cout << i << "\n";
				for(int j=0;j<i;j++){
					string tmp = "";
					if(j != 0) cout << " ";
					tmp = tmp + dq.back();
					dq.pop_back();
					for(int k=0;k<a/2;k++){
						tmp = tmp + dq.front();
						dq.pop_front();
						tmp = dq.front() + tmp;
						dq.pop_front();
					}
					cout << tmp;
				}
				cout << "\n";
				return 0;
			}
			else continue;
		}
	}
}


#include <bits/stdc++.h>

#define INF 1e9+7
#define pf2 pop_front
#define pb2 pop_back
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define sz size
#define eps 1e-7
#define fod find_by_order
#define fastio ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
#define ofk order_of_key
#define val(x) cout << "Value dari "<< #x << " adalah " << x  << "\n"
#define tr tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
typedef long long ll;
using namespace std;

int dx[8] = {1,0,-1,0,1,1,-1,-1};
int dy[8] = {0,1,0,-1,1,-1,1,-1};

void readf(string x){
	freopen((x+".in").c_str(),"r",stdin);
	freopen((x+".out").c_str(),"w",stdout);
}

void pr(string x){
	freopen((x+".in").c_str(),"w",stdout);
}

int read()
{
	bool min = 0;
	int  result = 0;
	char ch;
	ch = getchar();
	while(1)
	{
		if(ch == '-') break;
		if(ch >='0' && ch <= '9') break;
		ch = getchar();
	}
	if(ch == '-') min = 1;else result = ch-'0';
	while(1)
	{
		ch =getchar();
		if(ch< '0' || ch>'9') break;
		result = result * 10 + (ch-'0');
	}
	if(min) return -result;
	return result;
}
//Reynaldo's Template

int main(){
	fastio
	int N;
	cin >> N;
	string x;
	cin >> x;
	sort(x.begin(),x.end());
	vector<pair<char,int> >v;
	v.pb({x[0],1});
	for(int i=1;i<x.size();i++){
		if(x[i] == (v.back()).fi) {
			(v.back()).se++;
		}
		else {
			v.pb({x[i],1});
		}
	}
	deque<char> dq;
	int ganjil = 0,genap = 0;
	for(int i=0;i<v.size();i++){
		char a = v[i].fi;
		int b  = v[i].se;
		ganjil += b%2;
		genap += (b/2*2);
		for(int j=0;j<b%2;j++) dq.pb(a);
		for(int j=0;j<b/2*2;j++) dq.push_front(a);
	}
	if(N == 4*1e5) assert(0);
	for(int i=1;i<=N;i++){
		if(N % i != 0) continue;
		int a = N/i;
		if(a % 2 == 0){
			if(ganjil == 0){
				cout << i << "\n";
				for(int j=0;j<i;j++){
					string tmp = "";
					if(j != 0) cout << " ";
					for(int k=0;k<a/2;k++){
				//		cout << dq.front();
						tmp = tmp + dq.front();
						dq.pop_front();
						tmp = dq.front() + tmp;
						dq.pop_front();
					}
					cout << tmp;
				}
				cout << "\n";
				return 0;
			}
			else continue;
		}
		else{
			if(ganjil <= i){
				cout << i << "\n";
				for(int j=0;j<i;j++){
					string tmp = "";
					if(j != 0) cout << " ";
					tmp = tmp + dq.back();
					dq.pop_back();
					for(int k=0;k<a/2;k++){
						tmp = tmp + dq.front();
						dq.pop_front();
						tmp = dq.front() + tmp;
						dq.pop_front();
					}
					cout << tmp;
				}
				cout << "\n";
				return 0;
			}
			else continue;
		}
	}
}


#include <bits/stdc++.h>

#define pf push_front
#define INF 1e9+7
#define pf2 pop_front
#define pb2 pop_back
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define sz size
#define eps 1e-7
#define fod find_by_order
#define fastio ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
#define ofk order_of_key
#define val(x) cout << "Value dari "<< #x << " adalah " << x  << "\n"
#define tr tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
typedef long long ll;
using namespace std;

int dx[8] = {1,0,-1,0,1,1,-1,-1};
int dy[8] = {0,1,0,-1,1,-1,1,-1};

void readf(string x){
	freopen((x+".in").c_str(),"r",stdin);
	freopen((x+".out").c_str(),"w",stdout);
}

void pr(string x){
	freopen((x+".in").c_str(),"w",stdout);
}

int read()
{
	bool min = 0;
	int  result = 0;
	char ch;
	ch = getchar();
	while(1)
	{
		if(ch == '-') break;
		if(ch >='0' && ch <= '9') break;
		ch = getchar();
	}
	if(ch == '-') min = 1;else result = ch-'0';
	while(1)
	{
		ch =getchar();
		if(ch< '0' || ch>'9') break;
		result = result * 10 + (ch-'0');
	}
	if(min) return -result;
	return result;
}
//Reynaldo's Template

int main(){
	fastio
	int N;
	cin >> N;
	string x;
	cin >> x;
	sort(x.begin(),x.end());
	vector<pair<char,int> >v;
	v.pb({x[0],1});
	for(int i=1;i<x.size();i++){
		if(x[i] == (v.back()).fi) {
			(v.back()).se++;
		}
		else {
			v.pb({x[i],1});
		}
	}
	deque<char> dq;
	int ganjil = 0,genap = 0;
	for(int i=0;i<v.size();i++){
		char a = v[i].fi;
		int b  = v[i].se;
		ganjil += b%2;
		genap += (b/2*2);
		for(int j=0;j<b%2;j++) dq.pb(a);
		for(int j=0;j<b/2*2;j++) dq.push_front(a);
	}
	//if(N == 4*1e5) assert(0);
	for(int i=1;i<=N;i++){
		if(N % i != 0) continue;
		int a = N/i;
		if(a % 2 == 0){
			if(ganjil == 0){
				cout << i << "\n";
				for(int j=0;j<i;j++){
					deque<char> tmp;
					if(j != 0) cout << " ";
					for(int k=0;k<a/2;k++){
				//		cout << dq.front();t
						tmp.pb(dq.front());
				//		tmp = tmp + dq.front();
						dq.pop_front();
						tmp.pf(dq.front());
					//	tmp = dq.front() + tmp;
						dq.pop_front();
					}
			//		cout << tmp;
					while(!tmp.empty()){
						cout << tmp.front();
						tmp.pop_front();
					}
				}
				cout << "\n";
				return 0;
			}
			else continue;
		}
		else{
			if(ganjil <= i){
				cout << i << "\n";
				for(int j=0;j<i;j++){
					deque<char> tmp;
					if(j != 0) cout << " ";
					tmp.pb(dq.back());
		//			tmp = tmp + dq.back();
					dq.pop_back();
					for(int k=0;k<a/2;k++){
					//	tmp = tmp + dq.front();
						tmp.pb(dq.front());
						dq.pop_front();
						tmp.pf(dq.front());
					//	tmp = dq.front() + tmp;
						dq.pop_front();
					}
				//	cout << tmp;
					while(!tmp.empty()){
						cout << tmp.front();
						tmp.pop_front();
					}
				}

				cout << "\n";
				return 0;
			}
			else continue;
		}
	}
}


#include <bits/stdc++.h>

#define INF 1e9+7
#define pf2 pop_front
#define pb2 pop_back
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define sz size
#define eps 1e-7
#define fod find_by_order
#define fastio ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
#define ofk order_of_key
#define val(x) cout << "Value dari "<< #x << " adalah " << x  << "\n"
#define tr tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
typedef long long ll;
using namespace std;

int dx[8] = {1,0,-1,0,1,1,-1,-1};
int dy[8] = {0,1,0,-1,1,-1,1,-1};

void readf(string x){
	freopen((x+".in").c_str(),"r",stdin);
	freopen((x+".out").c_str(),"w",stdout);
}

void pr(string x){
	freopen((x+".in").c_str(),"w",stdout);
}

int read()
{
	bool min = 0;
	int  result = 0;
	char ch;
	ch = getchar();
	while(1)
	{
		if(ch == '-') break;
		if(ch >='0' && ch <= '9') break;
		ch = getchar();
	}
	if(ch == '-') min = 1;else result = ch-'0';
	while(1)
	{
		ch =getchar();
		if(ch< '0' || ch>'9') break;
		result = result * 10 + (ch-'0');
	}
	if(min) return -result;
	return result;
}
//Reynaldo's Template

int main(){
	fastio
	int N;
	cin >> N;
	string x;
	cin >> x;
	//vector<p > v;
//	for(int i=0;i<N;i++){
//		v.pb({x[i]});
//	}
	sort(x.begin(),x.end());
	vector<pair<char,int> >v;
	v.pb({x[0],1});
	for(int i=1;i<x.size();i++){
		if(x[i] == (v.back()).fi) {
			(v.back()).se++;
		}
		else {
			v.pb({x[i],1});
		}
	}
	deque<char> dq;
	int ganjil = 0,genap = 0;
	for(int i=0;i<v.size();i++){
		char a = v[i].fi;
		int b  = v[i].se;
		ganjil += b%2;
		genap += (b/2*2);
		for(int j=0;j<b%2;j++) dq.pb(a);
		for(int j=0;j<b/2*2;j++) dq.push_front(a);
	}
	for(int i=1;i<=N;i++){
		if(N % i != 0) continue;
		int a = N/i;
		if(a % 2 == 0){
			if(ganjil == 0){
				cout << i << "\n";
				for(int j=0;j<i;j++){
					string tmp = "";
					if(j != 0) cout << " ";
					for(int k=0;k<a/2;k++){
				//		cout << dq.front();
						tmp = tmp + dq.front();
						dq.pop_front();
						tmp = dq.front() + tmp;
						dq.pop_front();
					}
					cout << tmp;
				}
				cout << "\n";
				return 0;
			}
			else continue;
		}
		else{
			if(ganjil <= i){
				cout << i << "\n";
				for(int j=0;j<i;j++){
					string tmp = "";
					if(j != 0) cout << " ";
					tmp = tmp + dq.back();
					dq.pop_back();
					for(int k=0;k<a/2;k++){
						tmp = tmp + dq.front();
						dq.pop_front();
						tmp = dq.front() + tmp;
						dq.pop_front();
					}
					cout << tmp;
				}
				cout << "\n";
				return 0;
			}
			else continue;
		}
	}
}


#include <bits/stdc++.h>

#define INF 1e9+7
#define pf2 pop_front
#define pb2 pop_back
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define sz size
#define eps 1e-7
#define fod find_by_order
#define fastio ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
#define ofk order_of_key
#define val(x) cout << "Value dari "<< #x << " adalah " << x  << "\n"
#define tr tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
typedef long long ll;
using namespace std;

int dx[8] = {1,0,-1,0,1,1,-1,-1};
int dy[8] = {0,1,0,-1,1,-1,1,-1};

void readf(string x){
	freopen((x+".in").c_str(),"r",stdin);
	freopen((x+".out").c_str(),"w",stdout);
}

void pr(string x){
	freopen((x+".in").c_str(),"w",stdout);
}

int read()
{
	bool min = 0;
	int  result = 0;
	char ch;
	ch = getchar();
	while(1)
	{
		if(ch == '-') break;
		if(ch >='0' && ch <= '9') break;
		ch = getchar();
	}
	if(ch == '-') min = 1;else result = ch-'0';
	while(1)
	{
		ch =getchar();
		if(ch< '0' || ch>'9') break;
		result = result * 10 + (ch-'0');
	}
	if(min) return -result;
	return result;
}
//Reynaldo's Template

int main(){
	fastio
	int N;
	cin >> N;
	string x;
	cin >> x;
	map<char,int> mp;
	for(int i=0;i<N;i++){
		mp[x[i]]++;
	}
	vector<pair<int,int> > v;
	deque<char> dq;
	int ganjil = 0,genap = 0;
	for(map<char,int>::iterator it=mp.begin();it!=mp.end();it++){
		v.pb({it->first,it->second});
		char a = it->first;
		int b = it->second;
		if(b % 2 == 1)
		{
			ganjil++;
			dq.pb(a);
		}
		for(int j=0;j<b/2*2;j++) dq.push_front(a);
		genap =  genap + b/2;
	}
	for(int i=1;i<=N;i++){
		if(N % i != 0) continue;
		int a = N/i;
		if(a % 2 == 0){
			if(ganjil == 0){
				cout << i << "\n";
				for(int j=0;j<i;j++){
					string tmp = "";
					if(j != 0) cout << " ";
					for(int k=0;k<a/2;k++){
				//		cout << dq.front();
						tmp = tmp + dq.front();
						dq.pop_front();
						tmp = dq.front() + tmp;
						dq.pop_front();
					}
					cout << tmp;
				}
				cout << "\n";
				return 0;
			}
			else continue;
		}
		else{
			if(ganjil <= i){
				cout << i << "\n";
				for(int j=0;j<i;j++){
					string tmp = "";
					if(j != 0) cout << " ";
					tmp = tmp + dq.back();
					dq.pop_back();
					for(int k=0;k<a/2;k++){
						tmp = tmp + dq.front();
						dq.pop_front();
						tmp = dq.front() + tmp;
						dq.pop_front();
					}
					cout << tmp;
				}
				cout << "\n";
				return 0;
			}
			else continue;
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

#define MOD 1000000007
#define ll long long int
#define ld long double
#define pb push_back
#define mkp make_pair
#define pii pair<int, int>
#define pll pair<long long int, long long int>
#define sci(x) scanf("%d", &x)
#define scl(x) scanf("%lld", &x)
#define fi first
#define sc second
#define deb 0

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

	int n, i, j, k, x, y, z, a, b, c;
	map<char, int> mp;
	string s;
	cin >> n >> s;
	for (i = 0; i < n; ++i) {
		mp[s[i]]++;
	}
	int cnt = 0;
	for (auto it: mp) cnt += (it.sc & 1);
	if (cnt == 0) {
		string a = "";
		for (auto it: mp) {
			x = it.sc / 2;
			while (x--) {
				a += it.fi;
			}
		}
		string b = a;
		reverse(b.begin(), b.end());
		a += b;
		cout << 1 << endl;
		cout << a << endl;
	} else if ((n%cnt == 0) && ((n/cnt)%2 == 1)) {
		int len = n / cnt;
		set<char> mid;
		for (auto it: mp) {
			if ((it.sc & 1)) {
				mid.insert(it.fi);
			}
		}

		vector<string> v;

		for (auto it: mid) {
			string a = "", b = "";
			int sub_len = (len - 1) / 2;
			for (auto it1: mp) {
				while (mp[it1.fi] >= 2 && sub_len > 0) {
					a += it1.fi;
					b += it1.fi;
					mp[it1.fi] -= 2;
					sub_len -= 1;
				}
			}
			reverse(b.begin(), b.end());
			a = a + it + b;
			v.pb(a);
		}

		cout << v.size() << endl;
		for (auto it: v) {
			assert(it.size() == len);
		}
		for (auto it: v) cout << it << " "; cout << endl;
	} else {
		cout << n << endl;
		for (i = 0; i < n; ++i) cout << s[i] << " "; cout << endl;
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define MOD 1000000007
#define ll long long int
#define ld long double
#define pb push_back
#define mkp make_pair
#define pii pair<int, int>
#define pll pair<long long int, long long int>
#define sci(x) scanf("%d", &x)
#define scl(x) scanf("%lld", &x)
#define fi first
#define sc second
#define deb 0

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

	int n, i, j, k, x, y, z, a, b, c;
	map<char, int> mp;
	string s;
	cin >> n >> s;
	for (i = 0; i < n; ++i) {
		mp[s[i]]++;
	}
	int cnt = 0;
	for (auto it: mp) cnt += (it.sc & 1);
	if (cnt == 0) {
		string a = "";
		for (auto it: mp) {
			x = it.sc / 2;
			while (x--) {
				a += it.fi;
			}
		}
		string b = a;
		reverse(b.begin(), b.end());
		a += b;
		cout << 1 << endl;
		cout << a << endl;
		return 0;
	}
	multiset<char> mid;
	for (auto it: mp) {
		if (mp[it.fi]%2 == 1) {
			mid.insert(it.fi);
			mp[it.fi] -= 1;
		}
	}
	while (!(n%cnt == 0 && (n/cnt)%2 == 1)) {
		for (auto it: mp) {
			if (mp[it.fi] >= 2) {
				mp[it.fi] -= 2;
				cnt += 2;
				mid.insert(it.fi);
				mid.insert(it.fi);
				break;
			}
		}
	}
	int len = n / cnt;
	vector<string> v;
	for (auto it: mid) {
		string a = "", b = "";
		int sub_len = (len - 1) / 2;
		for (auto it1: mp) {
			while (mp[it1.fi] >= 2 && sub_len > 0) {
				a += it1.fi;
				b += it1.fi;
				mp[it1.fi] -= 2;
				sub_len -= 1;
			}
		}
		reverse(b.begin(), b.end());
		a = a + it + b;
		v.pb(a);
	}
	cout << v.size() << endl;
	for (auto it: v) cout << it << " "; cout << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define MOD 1000000007
#define ll long long int
#define ld long double
#define pb push_back
#define mkp make_pair
#define pii pair<int, int>
#define pll pair<long long int, long long int>
#define sci(x) scanf("%d", &x)
#define scl(x) scanf("%lld", &x)
#define fi first
#define sc second
#define deb 0

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

	int n, i, j, k, x, y, z, a, b, c;
	map<char, int> mp;
	string s;
	cin >> n >> s;
	for (i = 0; i < n; ++i) {
		mp[s[i]]++;
	}
	int cnt = 0;
	for (auto it: mp) cnt += (it.sc & 1);
	if (cnt == 0) {
		string a = "";
		for (auto it: mp) {
			x = it.sc / 2;
			while (x--) {
				a += it.fi;
			}
		}
		string b = a;
		reverse(b.begin(), b.end());
		a += b;
		cout << 1 << endl;
		cout << a << endl;
	} else if ((n%cnt == 0) && ((n/cnt)%2 == 1)) {
		int len = n / cnt;
		set<char> mid;
		for (auto it: mp) {
			if ((it.sc&1)) {
				mid.insert(it.fi);
			}
		}

		vector<string> v;

		for (auto it: mid) {
			string a = "", b = "";
			int sub_len = (len - 1) / 2;
			for (auto it1: mp) {
				while (it1.sc > 1 && sub_len > 0) {
					a += it1.fi;
					b += it1.fi;
					it1.sc -= 2;
					sub_len -= 1;
				}
			}
			reverse(b.begin(), b.end());
			a = a + it + b;
			v.pb(a);
		}

		cout << v.size() << endl;
		for (auto it: v) cout << it << " "; cout << endl;
	} else {
		cout << n << endl;
		for (i = 0; i < n; ++i) cout << s[i] << " "; cout << endl;
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define MOD 1000000007
#define ll long long int
#define ld long double
#define pb push_back
#define mkp make_pair
#define pii pair<int, int>
#define pll pair<long long int, long long int>
#define sci(x) scanf("%d", &x)
#define scl(x) scanf("%lld", &x)
#define fi first
#define sc second
#define deb 0

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

	int n, i, j, k, x, y, z, a, b, c;
	map<char, int> mp;
	string s;
	cin >> n >> s;
	for (i = 0; i < n; ++i) {
		mp[s[i]]++;
	}
	int cnt = 0;
	for (auto it: mp) cnt += (it.sc & 1);
	if (cnt == 0) {
		string a = "";
		for (auto it: mp) {
			x = it.sc / 2;
			while (x--) {
				a += it.fi;
			}
		}
		string b = a;
		reverse(b.begin(), b.end());
		a += b;
		cout << 1 << endl;
		cout << a << endl;
	} else if ((n%cnt == 0) && ((n/cnt)%2 == 1)) {
		int len = n / cnt;
		set<char> mid;
		for (auto it: mp) {
			if ((it.sc & 1)) {
				mid.insert(it.fi);
			}
		}

		vector<string> v;

		for (auto it: mid) {
			string a = "", b = "";
			int sub_len = (len - 1) / 2;
			for (auto it1: mp) {
				while (mp[it1.fi] >= 2 && sub_len > 0) {
					a += it1.fi;
					b += it1.fi;
					mp[it1.fi] -= 2;
					sub_len -= 1;
				}
			}
			reverse(b.begin(), b.end());
			a = a + it + b;
			v.pb(a);
		}

		cout << v.size() << endl;
		for (auto it: v) cout << it << " "; cout << endl;
	} else {
		cout << n << endl;
		for (i = 0; i < n; ++i) cout << s[i] << " "; cout << endl;
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define MOD 1000000007
#define ll long long int
#define ld long double
#define pb push_back
#define mkp make_pair
#define pii pair<int, int>
#define pll pair<long long int, long long int>
#define sci(x) scanf("%d", &x)
#define scl(x) scanf("%lld", &x)
#define fi first
#define sc second
#define deb 0

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

	int n, i, j, k, x, y, z, a, b, c;
	map<char, int> mp;
	string s;
	cin >> n >> s;
	for (i = 0; i < n; ++i) {
		mp[s[i]]++;
	}
	int cnt = 0;
	for (auto it: mp) cnt += (it.sc & 1);
	if (cnt == 0) {
		string a = "";
		for (auto it: mp) {
			x = it.sc / 2;
			while (x--) {
				a += it.fi;
			}
		}
		string b = a;
		reverse(b.begin(), b.end());
		a += b;
		cout << 1 << endl;
		cout << a << endl;
	} else if (n%cnt == 0 && (n/cnt)%2 == 1) {
		int len = n / cnt;
		set<char> mid;
		for (auto it: mp) {
			if (it.sc == 1) {
				mid.insert(it.fi);
			}
		}

		vector<string> v;

		for (auto it: mid) {
			string a = "", b = "";
			int sub_len = (len - 1) / 2;
			for (auto it1: mp) {
				while (it1.sc > 1 && sub_len > 0) {
					a += it1.fi;
					b += it1.fi;
					it1.sc -= 2;
					sub_len -= 1;
				}
			}
			reverse(b.begin(), b.end());
			a = a + it + b;
			v.pb(a);
		}

		cout << v.size() << endl;
		for (auto it: v) cout << it << " "; cout << endl;
	} else {
		cout << n << endl;
		for (i = 0; i < n; ++i) cout << s[i] << " "; cout << endl;
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define MOD 1000000007
#define ll long long int
#define ld long double
#define pb push_back
#define mkp make_pair
#define pii pair<int, int>
#define pll pair<long long int, long long int>
#define sci(x) scanf("%d", &x)
#define scl(x) scanf("%lld", &x)
#define fi first
#define sc second
#define deb 0

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

	int n, i, j, k, x, y, z, a, b, c;
	map<char, int> mp;
	string s;
	cin >> n >> s;
	for (i = 0; i < n; ++i) {
		mp[s[i]]++;
	}
	int cnt = 0;
	for (auto it: mp) cnt += (it.sc & 1);
	if (cnt == 0) {
		string a = "";
		for (auto it: mp) {
			x = it.sc / 2;
			while (x--) {
				a += it.fi;
			}
		}
		string b = a;
		reverse(b.begin(), b.end());
		a += b;
		cout << 1 << endl;
		cout << a << endl;
	} else if (n%cnt == 0 && (n/cnt)%2 == 1) {
		int len = n / cnt;
		set<char> mid;
		for (auto it: mp) {
			if (it.sc == 1) {
				mid.insert(it.fi);
			}
		}

		vector<string> v;

		for (auto it: mid) {
			string a = "", b = "";
			int sub_len = (len - 1) / 2;
			for (auto it1: mp) {
				while (it1.sc > 1 && sub_len > 0) {
					a += it1.fi;
					b += it1.fi;
					it1.sc -= 2;
					sub_len -= 2;
				}
			}
			reverse(b.begin(), b.end());
			a = a + it + b;
			v.pb(a);
		}

		cout << v.size() << endl;
		for (auto it: v) cout << it << " "; cout << endl;
	} else {
		cout << n << endl;
		for (i = 0; i < n; ++i) cout << s[i] << " "; cout << endl;
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define MOD 1000000007
#define ll long long int
#define ld long double
#define pb push_back
#define mkp make_pair
#define pii pair<int, int>
#define pll pair<long long int, long long int>
#define sci(x) scanf("%d", &x)
#define scl(x) scanf("%lld", &x)
#define fi first
#define sc second
#define deb 0

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

	int n, i, j, k, x, y, z, a, b, c;
	map<char, int> mp;
	string s;
	cin >> n >> s;
	for (i = 0; i < n; ++i) {
		mp[s[i]]++;
	}
	int cnt = 0;
	for (auto it: mp) cnt += (it.sc & 1);
	if (cnt == 0) {
		string a = "";
		for (auto it: mp) {
			x = it.sc / 2;
			while (x--) {
				a += it.fi;
			}
		}
		string b = a;
		reverse(b.begin(), b.end());
		a += b;
		cout << 1 << endl;
		cout << a << endl;
	} else if (n%cnt == 0 && (n/cnt)%2 == 1) {
		int len = n / cnt;
		set<char> mid;
		for (auto it: mp) {
			if (it.sc == 1) {
				mid.insert(it.fi);
			}
		}

		vector<string> v;

		for (auto it: mid) {
			string a = "", b = "";
			int sub_len = (len - 1) / 2;
			for (auto it1: mp) {
				while (it1.sc > 1 && sub_len > 0) {
					a += it1.fi;
					b += it1.fi;
					it1.sc -= 2;
					sub_len -= 2;
				}
			}
			a = a + it + b;
			v.pb(a);
		}

		cout << v.size() << endl;
		for (auto it: v) cout << it << " "; cout << endl;
	} else {
		cout << n << endl;
		for (i = 0; i < n; ++i) cout << s[i] << " "; cout << endl;
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define MOD 1000000007
#define ll long long int
#define ld long double
#define pb push_back
#define mkp make_pair
#define pii pair<int, int>
#define pll pair<long long int, long long int>
#define sci(x) scanf("%d", &x)
#define scl(x) scanf("%lld", &x)
#define fi first
#define sc second
#define deb 0

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

	int n, i, j, k, x, y, z, a, b, c;
	map<char, int> mp;
	string s;
	cin >> n >> s;
	for (i = 0; i < n; ++i) {
		mp[s[i]]++;
	}
	int cnt = 0;
	for (auto it: mp) cnt += (it.sc & 1);
	if (cnt == 0) {
		string a = "";
		for (auto it: mp) {
			x = it.sc / 2;
			while (x--) {
				a += it.fi;
			}
		}
		string b = a;
		reverse(b.begin(), b.end());
		a += b;
		cout << 1 << endl;
		cout << a << endl;
		return 0;
	}

	multiset<char> mid;
	for (auto it: mp) {
		if (mp[it.fi]%2 == 1) {
			mid.insert(it.fi);
			mp[it.fi] -= 1;
		}
	}
	while (!(n%cnt == 0 && (n/cnt)%2 == 1)) {
		for (auto it: mp) {
			if (mp[it.fi] >= 2) {
				mp[it.fi] -= 2;
				cnt += 2;
				mid.insert(it.fi);
				mid.insert(it.fi);
				break;
			}
		}
	}
	int len = n / cnt;

	vector<string> v;

	for (auto it: mid) {
		string a = "", b = "";
		int sub_len = (len - 1) / 2;
		for (auto it1: mp) {
			while (mp[it1.fi] >= 2 && sub_len > 0) {
				a += it1.fi;
				b += it1.fi;
				mp[it1.fi] -= 2;
				sub_len -= 1;
			}
		}
		reverse(b.begin(), b.end());
		a = a + it + b;
		v.pb(a);
	}

	cout << v.size() << endl;
	for (auto it: v) cout << it << " "; cout << endl;

	return 0;
}


// 235816VL
#include <bits/stdc++.h>
int const INF = 1e9;
typedef unsigned long long int lli;
using namespace std;
const lli mod = 1e9+9;
int main()
{
     int n;
     cin>>n;
    string s;
    cin>>s;
    map< char, int > mt;
    for( int i(0);i<n; i++){
        mt[s[i]]++;
    }
    int nch(0);
    string tmp;
    vector< char> res;
    bool f1=0;
    for( auto it: mt){
            for( int i(0); i<it.second/2; i++){
                tmp.push_back(it.first);
                f1=1;
            }
            if(it.second&1){
                res.push_back(it.first);
                nch++;
            }
    }

    if(f1==1 && nch==0){
        cout << "1\n";
        cout << tmp;
        for( int i(tmp.size()-1); i>=0; i--) printf("%c", tmp[i]);
        return 0;
    }

    if(n%nch!=0 || ((n-nch)/nch)%2!=0){
        cout << s.size()<<endl;
        for( auto it:s) cout << it<<" ";
        return 0;
    }
        printf("%d\n", nch);
         int len = n/nch;
         int index(0);
         for( int i(0); i<nch; i++){
            string L;
            for(int i(0); i<len/2; i++) L.push_back(tmp[index]), index++;
            cout << L<<res[i];
            for( int i(L.size()-1); i>=0; i--) cout <<L[i];
            printf(" ");
        }
    return 0;
}


#include <bits/stdc++.h>

#define ALL(x) x.begin(), x.end()

using ll = long long;

using namespace std;

const int N = 3e5 + 5;

unordered_map<char, int> char_table;

bool solve() {
    int n;
    cin >> n;
    string str;
    cin >> str;
    for (char c : str)
        ++char_table[c];
    int a = count_if(char_table.begin(), char_table.end(), [](const auto& a) {
        return (a.second & 1);
    });
    if (a == 0) {
        cout << 1 << endl;
        string res;
        for (const auto& e : char_table)
            res += string(e.second / 2, e.first);
        cout << res;
        reverse(res.begin(), res.end());
        cout << res << endl;
        return 0;
    }
    vector<char> odds;
    if (n % a == 0) {
        int b = n - a;
        if (!(b & 1) && b % a == 0 && !((b / a) & 1)) {
            int c = (b / a) / 2;
            cout << a << endl;
            for (auto& e : char_table) {
                if (e.second & 1) {
                    --e.second;
                    odds.push_back(e.first);
                }
            }
            for (auto& e : char_table)
                e.second /= 2;
            for (char odd : odds) {
                int cc = c;
                string out_str;
                for (auto& e : char_table) {
                    int tmp = min(cc, e.second);
                    out_str += string(tmp, e.first);
                    e.second -= tmp;
                    cc -= tmp;
                }
                if (cc == 0) {
                    cout << out_str << odd;
                    reverse(out_str.begin(), out_str.end());
                    cout << out_str << ' ';
                }
            }
            cout << endl;
        } else {
            cout << str.size() << endl;
            for (char c : str)
                printf("%c ", c);
            cout << endl;
        }
    } else {
        cout << str.size() << endl;
        for (char c : str)
            printf("%c ", c);
        cout << endl;
    }

    return 0;
}

int main() {
#ifdef LOCALHOST
    freopen("input", "r", stdin);
#endif
    while (solve());

    return 0;
}


// 235816VL
#include <bits/stdc++.h>
int const INF = 1e9;
typedef unsigned long long int lli;
using namespace std;
const lli mod = 1e9+9;
int main()
{
     int n;
     cin>>n;
    string s;
    cin>>s;
    n=s.size();
    map< char, int > mt;
    for( int i(0);i<n; i++){
        mt[s[i]]++;
    }
    int nch(0);
    string tmp;
    vector< char> res;
    bool f1=0;
    for( auto it: mt){
            for( int i(0); i<it.second/2; i++){
                tmp.push_back(it.first);
                f1=1;
            }
            if(it.second&1){
                res.push_back(it.first);
                nch++;
            }
    }

    if(f1==1 && nch==0){
        cout << "1\n";
        cout << tmp;
        for( int i(tmp.size()-1); i>=0; i--) printf("%c", tmp[i]);
        return 0;
    }
      while(n%nch != 0 || ((n-nch)/nch)%2!=0 || (n/nch)%2==0 ){
            if(tmp.size()){
                res.push_back(tmp[tmp.size()-1]);
                res.push_back(tmp[tmp.size()-1]);
                nch+=2;
                tmp.pop_back();
            }
        }
      if ( n%nch!=0 || ((n-nch)/nch)%2!=0 || (n/nch)%2==0 ){
        cout << s.size()<<endl;
        for( auto it:s) cout << it<<" ";
        return 0;
    }
      vector< string > ANS(nch);
        //printf("%d\n", nch);
         int len = n/nch;
         int index(0);
         for( int i(0); i<nch; i++){
            string L;
            for(int j(0); j<len/2; j++) L.push_back(tmp[index]), index++;
            //cout << L<<res[i];
            ANS[i]=L;
            ANS[i].push_back(res[i]);
            for( int j(L.size()-1); j>=0; j--) ANS[i].push_back(L[j]);//cout <<L[j];
            //printf(" ");
        }
         bool check(0);
         for( int i(0); i<ANS.size(); i++){
            if(ANS[i].size()!=n/nch){
                check=1;
            }
         }
         if(check){
             if ( n%nch!=0 || ((n-nch)/nch)%2!=0 || (n/nch)%2==0 ){
               cout << s.size()<<endl;
               for( auto it:s) cout << it<<" ";
               return 0;
           }
         }
         printf("%d\n", ANS.size());
         for( int i(0); i<ANS.size(); i++){
               cout << ANS[i];
               printf(" ");
         }

    return 0;
}


// 235816VL
#include <bits/stdc++.h>
int const INF = 1e9;
typedef unsigned long long int lli;
using namespace std;
const lli mod = 1e9+9;
int main()
{
     int n;
     cin>>n;
    string s;
    cin>>s;
    n=s.size();
    map< char, int > mt;
    for( int i(0);i<n; i++){
        mt[s[i]]++;
    }
    int nch(0);
    string tmp;
    vector< char> res;
    bool f1=0;
    for( auto it: mt){
            for( int i(0); i<it.second/2; i++){
                tmp.push_back(it.first);
                f1=1;
            }
            if(it.second&1){
                res.push_back(it.first);
                nch++;
            }
    }

    if(f1==1 && nch==0){
        cout << "1\n";
        cout << tmp;
        for( int i(tmp.size()-1); i>=0; i--) printf("%c", tmp[i]);
        return 0;
    }
      if ( n%nch!=0 || ((n-nch)/nch)%2!=0 || (n/nch)%2==0 ){
        cout << s.size()<<endl;
        for( auto it:s) cout << it<<" ";
        return 0;
    }
      vector< string > ANS(nch);
        //printf("%d\n", nch);
         int len = n/nch;
         int index(0);
         for( int i(0); i<nch; i++){
            string L;
            for(int j(0); j<len/2; j++) L.push_back(tmp[index]), index++;
            //cout << L<<res[i];
            ANS[i]=L;
            ANS[i].push_back(res[i]);
            for( int j(L.size()-1); j>=0; j--) ANS[i].push_back(L[j]);//cout <<L[j];
            //printf(" ");
        }
         bool check(0);
         for( int i(0); i<ANS.size(); i++){
            if(ANS[i].size()!=n/nch){
                check=1;
            }
         }
         if(check){
             if ( n%nch!=0 || ((n-nch)/nch)%2!=0 || (n/nch)%2==0 ){
               cout << s.size()<<endl;
               for( auto it:s) cout << it<<" ";
               return 0;
           }
         }
         printf("%d\n", ANS.size());
         for( int i(0); i<ANS.size(); i++){
               cout << ANS[i];
               printf(" ");
         }

    return 0;
}


// 235816VL
#include <bits/stdc++.h>
int const INF = 1e9;
typedef unsigned long long int lli;
using namespace std;
const lli mod = 1e9+9;
int main()
{
     int n;
     cin>>n;
    string s;
    cin>>s;
    map< char, int > mt;
    for( int i(0);i<n; i++){
        mt[s[i]]++;
    }
    int nch(0);
    string tmp;
    vector< char> res;
    bool f1=0;
    for( auto it: mt){
            for( int i(0); i<it.second/2; i++){
                tmp.push_back(it.first);
                f1=1;
            }
            if(it.second&1){
                res.push_back(it.first);
                nch++;
            }
    }

    if(f1==1 && nch==0){
        cout << "1\n";
        cout << tmp;
        for( int i(tmp.size()-1); i>=0; i--) printf("%c", tmp[i]);
        return 0;
    }

    if(n%nch!=0){
        for( auto it:s) cout << it<<" ";
        return 0;
    }
        printf("%d\n", nch);
         int len = n/nch;
         int index(0);
         for( int i(0); i<nch; i++){
            string L;
            for(int i(0); i<len/2; i++) L.push_back(tmp[index]), index++;
            cout << L<<res[i];
            for( int i(L.size()-1); i>=0; i--) cout <<L[i];
            printf(" ");
        }
    return 0;
}


// 235816VL
#include <bits/stdc++.h>
int const INF = 1e9;
typedef unsigned long long int lli;
using namespace std;
const lli mod = 1e9+9;
int main()
{
     int n;
     cin>>n;
    string s;
    cin>>s;
    map< char, int > mt;
    for( int i(0);i<n; i++){
        mt[s[i]]++;
    }
    int nch(0);
    string tmp;
    vector< char> res;
    bool f1=0;
    for( auto it: mt){
            for( int i(0); i<it.second/2; i++){
                tmp.push_back(it.first);
                f1=1;
            }
            if(it.second&1){
                res.push_back(it.first);
                nch++;
            }
    }

    if(f1==1 && nch==0){
        cout << "1\n";
        cout << tmp;
        for( int i(tmp.size()-1); i>=0; i--) printf("%c", tmp[i]);
        return 0;
    }

    if(!(n%nch==0 && ((n-nch)/nch)%2==  0) && ( (n/nch)%2==1 ) ){
        cout << s.size()<<endl;
        for( auto it:s) cout << it<<" ";
        return 0;
    }
        printf("%d\n", nch);
         int len = n/nch;
         int index(0);
         for( int i(0); i<nch; i++){
            string L;
            for(int j(0); j<len/2; j++) L.push_back(tmp[index]), index++;
            cout << L<<res[i];
            for( int j(L.size()-1); j>=0; j--) cout <<L[j];
            printf(" ");
        }
    return 0;
}


// 235816VL
#include <bits/stdc++.h>
int const INF = 1e9;
typedef unsigned long long int lli;
using namespace std;
const lli mod = 1e9+9;
int main()
{
     int n;
     cin>>n;
    string s;
    cin>>s;
    map< char, int > mt;
    for( int i(0);i<n; i++){
        mt[s[i]]++;
    }
    int nch(0);
    string tmp;
    vector< char> res;
    bool f1=0;
    for( auto it: mt){
            for( int i(0); i<it.second/2; i++){
                tmp.push_back(it.first);
                f1=1;
            }
            if(it.second&1){
                res.push_back(it.first);
                nch++;
            }
    }
    if(f1 == 0 && n%nch!=0){
        for( auto it:s) cout << it<<" ";
        return 0;
    }
    if(f1==1 && nch==0){
        cout << "1\n";
        cout << tmp;
        for( int i(tmp.size()-1); i>=0; i--) printf("%c", tmp[i]);
        return 0;
    }
        printf("%d\n", nch);
         int len = n/nch;
         int index(0);
         for( int i(0); i<nch; i++){
            string L;
            for(int i(0); i<len/2; i++) L.push_back(tmp[index]), index++;
            cout << L<<res[i];
            for( int i(L.size()-1); i>=0; i--) cout <<L[i];
            printf(" ");
        }
    return 0;
}


// 235816VL
#include <bits/stdc++.h>
int const INF = 1e9;
typedef unsigned long long int lli;
using namespace std;
const lli mod = 1e9+9;
int main()
{
     int n;
     cin>>n;
    string s;
    cin>>s;
    n=s.size();
    map< char, int > mt;
    for( int i(0);i<n; i++){
        mt[s[i]]++;
    }
    int nch(0);
    string tmp;
    vector< char> res;
    bool f1=0;
    for( auto it: mt){
            for( int i(0); i<it.second/2; i++){
                tmp.push_back(it.first);
                f1=1;
            }
            if(it.second&1){
                res.push_back(it.first);
                nch++;
            }
    }

    if(f1==1 && nch==0){
        cout << "1\n";
        cout << tmp;
        for( int i(tmp.size()-1); i>=0; i--) printf("%c", tmp[i]);
        return 0;
    }

    //if(!(n%nch==0 && ((n-nch)/nch)%2==0) && ( (n/nch)%2==1 ) ){
      if ( n%nch!=0 || ((n-nch)/nch)%2!=0 || (n/nch)%2==0 ){
        cout << s.size()<<endl;
        for( auto it:s) cout << it<<" ";
        return 0;
    }
        printf("%d\n", nch);
         int len = n/nch;
         int index(0);
         for( int i(0); i<nch; i++){
            string L;
            for(int j(0); j<len/2; j++) L.push_back(tmp[index]), index++;
            cout << L<<res[i];
            for( int j(L.size()-1); j>=0; j--) cout <<L[j];
            printf(" ");
        }
    return 0;
}


// 235816VL
#include <bits/stdc++.h>
int const INF = 1e9;
typedef unsigned long long int lli;
using namespace std;
const lli mod = 1e9+9;
int main()
{
     int n;
     cin>>n;
    string s;
    cin>>s;
    map< char, int > mt;
    for( int i(0);i<n; i++){
        mt[s[i]]++;
    }
    int nch(0);
    string tmp;
    vector< char> res;
    bool f1=0;
    for( auto it: mt){
            for( int i(0); i<it.second/2; i++){
                tmp.push_back(it.first);
                f1=1;
            }
            if(it.second&1){
                res.push_back(it.first);
                nch++;
            }
    }

    if(f1==1 && nch==0){
        cout << "1\n";
        cout << tmp;
        for( int i(tmp.size()-1); i>=0; i--) printf("%c", tmp[i]);
        return 0;
    }

    if(n%nch!=0 || (n/nch)%2==0 ){
        cout << s.size()<<endl;
        for( auto it:s) cout << it<<" ";
        return 0;
    }
        printf("%d\n", nch);
         int len = n/nch;
         int index(0);
         for( int i(0); i<nch; i++){
            string L;
            for(int i(0); i<len/2; i++) L.push_back(tmp[index]), index++;
            cout << L<<res[i];
            for( int i(L.size()-1); i>=0; i--) cout <<L[i];
            printf(" ");
        }
    return 0;
}


// 235816VL
#include <bits/stdc++.h>
int const INF = 1e9;
typedef unsigned long long int lli;
using namespace std;
const lli mod = 1e9+9;
int main()
{
     int n;
     cin>>n;
    string s;
    cin>>s;
    map< char, int > mt;
    for( int i(0);i<n; i++){
        mt[s[i]]++;
    }
    string tmp;
    bool f(0);
    char mid;
    bool f1(0);
    for( auto it: mt){
            for( int i(0); i<it.second/2; i++){
                tmp.push_back(it.first);
                f1=1;
            }
            if(it.second&1){
                mt[it.first]=1;
            }
    }
    vector< char > res;
    int ans(0);
    if(f1) ans=1;
    for( auto it: mt){
        if(it.second==1){
            if(f1){
                if(!f) {
                    mid = it.first;
                    f=1;
                }
                else {
                    res.push_back(it.first);
                }
            }
            else {
                res.push_back(it.first);
            }
        }
    }

    printf("%d\n", ans+ res.size());
    if(f1){
        for(int i(0); i<n; i++){
            cout << tmp[i];
        }
        if(f) cout << mid;
        for( int i(tmp.size()-1); i>=0; i--) cout << tmp[i];
        cout <<" ";
    }
    for( int i(0); i<res.size(); i++){
        cout << res[i]<<" ";
    }
    return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define vl vector<ll>
#define fi first
#define se second
#define pii pair<int,int>
#define mp(a,b) make_pair(a,b)
#define pb(x) push_back(x)
#define mod	1000000007
#define rep(i,n) for( int i = 0; i < n; i++ )
#define rrep(i,n) for(int i = n - 1 ; i >= 0 ; i--)
#define myrep(i,a,b) for( int i = a; i <= b; i++ )

using namespace std ;

ll binPow(ll a ,ll b ,ll Mo){
    ll ans = 1;
    for (; b; b >>= 1, a = a * a % Mo)
        if (b&1) ans = ans * a % Mo;
    return ans;
}

int main()
	{
		ios_base::sync_with_stdio(false); cin.tie(0);
		int n;
		cin >> n;
		string s;
		cin >> s;
		set<int> d;
		for( int i = 1; i <= n/2; i++ ){
			if( n % i == 0 ){ d.insert(i);
							  d.insert(n/i);
							}
		}
		vector<int> divv;
		divv.assign(d.begin(),d.end());
		map<char,int> m;
		rep(i,n){
			m[s[i]]++;
		}
		vector<pair<char,int> > odd,even;
		int cnt = 0;
		for( map<char,int>::iterator it = m.begin(); it != m.end(); it++ ){
			if( it->second % 2 != 0 ) { cnt++; odd.pb(mp(it->first,it->second)); }
			else{ even.pb(mp(it->first,it->second)); }
		}

		int pos = 0;
		rrep(i,divv.size()){
				if( cnt > 0 && divv[i] % 2 == 0 ) continue;
				if( (n/divv[i]) < cnt ) continue;
				pos = i; break;
		}

		cnt = divv[pos];
		int clim = cnt/2;
		int st = n/cnt;
		cout << st << endl;
		if( cnt == 1 ){
			rep(i,s.length()){
				cout << s[i] << " ";
			}
			cout << endl;
			return 0;
		}
		int ep = 0;
		int op = 0;
		vector<string> ans;
		rep(i,st){
			string s = "";
			while( s.length() != clim ){
				if( ep < even.size() ){
					if( even[ep].se > 0 ){
					even[ep].se -= 2;
					s += even[ep].fi;
					}
					else{ ep++; }
				}
				else{
					if( op < odd.size() && odd[op].se > 1 ){
						odd[op].se -= 2;
						s += odd[op].fi;
					}
					else{ op++; }
				}
			}
			ans.pb( s );
		}

		op = 0;
		ep = 0;
		rep(i,ans.size()){
			int fl = 0;
			while( op < odd.size() && odd[op].se < 1 ) op++;
			if( op < odd.size() ) {
								fl = 1;
								ans[i] += odd[op].fi;
							    odd[op].se -= 1;
							}
			if( fl == 0 ){
				while( ep < even.size() && even[ep].se < 1 ) ep++;
				if( ep < even.size() ){
					ans[i] += even[ep].fi;
					even[ep].se -= 1;
				}
			}
			rrep(j,clim){
				ans[i] += ans[i][j];
			}
		}

		rep(i,ans.size()){
			cout << ans[i] << " ";
		}
		cout << endl;
		return 0 ;
	}


#include <bits/stdc++.h>
#define ll long long
#define vl vector<ll>
#define fi first
#define se second
#define pii pair<int,int>
#define mp(a,b) make_pair(a,b)
#define pb(x) push_back(x)
#define mod	1000000007
#define rep(i,n) for( int i = 0; i < n; i++ )
#define rrep(i,n) for(int i = n - 1 ; i >= 0 ; i--)
#define myrep(i,a,b) for( int i = a; i <= b; i++ )

using namespace std ;

ll binPow(ll a ,ll b ,ll Mo){
    ll ans = 1;
    for (; b; b >>= 1, a = a * a % Mo)
        if (b&1) ans = ans * a % Mo;
    return ans;
}

int main()
	{
		ios_base::sync_with_stdio(false); cin.tie(0);
		int n;
		cin >> n;
		string s;
		cin >> s;
		set<int> d;
		for( int i = 1; i <= n/2; i++ ){
			if( n % i == 0 ){ d.insert(i);
							  d.insert(n/i);
							}
		}
		vector<int> divv;
		divv.assign(d.begin(),d.end());
		map<char,int> m;
		rep(i,n){
			m[s[i]]++;
		}
		vector<pair<char,int> > odd,even;
		int cnt = 0;
		for( map<char,int>::iterator it = m.begin(); it != m.end(); it++ ){
			if( it->second % 2 != 0 ) { cnt++; odd.pb(mp(it->first,it->second)); }
			else{ even.pb(mp(it->first,it->second)); }
		}

		int pos = 0;
		rrep(i,divv.size()){
				if( cnt > 0 && divv[i] % 2 == 0 ) continue;
				if( (n/divv[i]) < cnt ) continue;
				pos = i; break;
		}

		cnt = divv[pos];
		int clim = cnt/2;
		int st = n/cnt;
		cout << st << endl;
		int ep = 0;
		int op = 0;
		vector<string> ans;
		rep(i,st){
			string s = "";
			while( s.length() != clim ){
				if( ep < even.size() ){
					if( even[ep].se > 0 ){
					even[ep].se -= 2;
					s += even[ep].fi;
					}
					else{ ep++; }
				}
				else{
					if( odd[op].se > 1 ){
						odd[op].se -= 2;
						s += odd[op].fi;
					}
					else{ op++; }
				}
			}
			ans.pb( s );
		}

		op = 0;
		rep(i,ans.size()){
			while( op < odd.size() && odd[op].se < 1 ) op++;
			if( op < odd.size() ) {
								ans[i] += odd[op].fi;
							    odd[op].se -= 1;
							}
			rrep(j,clim){
				ans[i] += ans[i][j];
			}
		}

		rep(i,ans.size()){
			cout << ans[i] << " ";
		}
		cout << endl;
		return 0 ;
	}


#include <bits/stdc++.h>
#define ll long long
#define vl vector<ll>
#define fi first
#define se second
#define pii pair<int,int>
#define mp(a,b) make_pair(a,b)
#define pb(x) push_back(x)
#define mod	1000000007
#define rep(i,n) for( int i = 0; i < n; i++ )
#define rrep(i,n) for(int i = n - 1 ; i >= 0 ; i--)
#define myrep(i,a,b) for( int i = a; i <= b; i++ )

using namespace std ;

ll binPow(ll a ,ll b ,ll Mo){
    ll ans = 1;
    for (; b; b >>= 1, a = a * a % Mo)
        if (b&1) ans = ans * a % Mo;
    return ans;
}

int main()
	{
		ios_base::sync_with_stdio(false); cin.tie(0);
		int n;
		cin >> n;
		string s;
		cin >> s;
		set<int> d;
		for( int i = 1; i <= n/2; i++ ){
			if( n % i == 0 ){ d.insert(i);
							  d.insert(n/i);
							}
		}
		vector<int> divv;
		divv.assign(d.begin(),d.end());
		map<char,int> m;
		rep(i,n){
			m[s[i]]++;
		}
		vector<pair<char,int> > odd,even;
		int cnt = 0;
		for( map<char,int>::iterator it = m.begin(); it != m.end(); it++ ){
			if( it->second % 2 != 0 ) { cnt++; odd.pb(mp(it->first,it->second)); }
			else{ even.pb(mp(it->first,it->second)); }
		}

		int pos = 0;
		rrep(i,divv.size()){
				if( cnt > 0 && divv[i] % 2 == 0 ) continue;
				if( (n/divv[i]) < cnt ) continue;
				pos = i; break;
		}

		cnt = divv[pos];
		int clim = cnt/2;
		int st = n/cnt;
		cout << st << endl;
		if( cnt == 1 ){
			rep(i,s.length()){
				cout << s[i] << " ";
			}
			cout << endl;
			return 0;
		}
		int ep = 0;
		int op = 0;
		vector<string> ans;
		rep(i,st){
			string s = "";
			while( s.length() != clim ){
				if( ep < even.size() ){
					if( even[ep].se > 0 ){
					even[ep].se -= 2;
					s += even[ep].fi;
					}
					else{ ep++; }
				}
				else{
					if( odd[op].se > 1 ){
						odd[op].se -= 2;
						s += odd[op].fi;
					}
					else{ op++; }
				}
			}
			ans.pb( s );
		}

		op = 0;
		ep = 0;
		rep(i,ans.size()){
			int fl = 0;
			while( op < odd.size() && odd[op].se < 1 ) op++;
			if( op < odd.size() ) {
								fl = 1;
								ans[i] += odd[op].fi;
							    odd[op].se -= 1;
							}
			if( fl == 0 ){
				while( ep < even.size() && even[ep].se < 1 ) ep++;
				if( ep < even.size() ){
					ans[i] += even[ep].fi;
					even[ep].se -= 1;
				}
			}
			rrep(j,clim){
				ans[i] += ans[i][j];
			}
		}

		rep(i,ans.size()){
			cout << ans[i] << " ";
		}
		cout << endl;
		return 0 ;
	}


#include <bits/stdc++.h>
#define ll long long
#define vl vector<ll>
#define fi first
#define se second
#define pii pair<int,int>
#define mp(a,b) make_pair(a,b)
#define pb(x) push_back(x)
#define mod	1000000007
#define rep(i,n) for( int i = 0; i < n; i++ )
#define rrep(i,n) for(int i = n - 1 ; i >= 0 ; i--)
#define myrep(i,a,b) for( int i = a; i <= b; i++ )

using namespace std ;

ll binPow(ll a ,ll b ,ll Mo){
    ll ans = 1;
    for (; b; b >>= 1, a = a * a % Mo)
        if (b&1) ans = ans * a % Mo;
    return ans;
}

int main()
	{
		ios_base::sync_with_stdio(false); cin.tie(0);
		int n;
		cin >> n;
		string s;
		cin >> s;
		set<int> d;
		if( n == 1 ){
			cout << 1 << endl;
			cout << s << endl;
			return 0;
		}
		for( int i = 1; i <= n/2; i++ ){
			if( n % i == 0 ){ d.insert(i);
							  d.insert(n/i);
							}
		}
		vector<int> divv;
		divv.assign(d.begin(),d.end());
		map<char,int> m;
		rep(i,n){
			m[s[i]]++;
		}
		vector<pair<char,int> > odd,even;
		int cnt = 0;
		for( map<char,int>::iterator it = m.begin(); it != m.end(); it++ ){
			if( it->second % 2 != 0 ) { cnt++; odd.pb(mp(it->first,it->second)); }
			else{ even.pb(mp(it->first,it->second)); }
		}

		int pos = 0;
		rrep(i,divv.size()){
				if( cnt > 0 && divv[i] % 2 == 0 ) continue;
				if( (n/divv[i]) < cnt ) continue;
				pos = i; break;
		}

		cnt = divv[pos];
		int clim = cnt/2;
		int st = n/cnt;
		cout << st << endl;
		if( cnt == 1 ){
			rep(i,s.length()){
				cout << s[i] << " ";
			}
			cout << endl;
			return 0;
		}
		int ep = 0;
		int op = 0;
		vector<string> ans;
		rep(i,st){
			string s = "";
			while( s.length() != clim ){
				if( ep < even.size() ){
					if( even[ep].se > 0 ){
					even[ep].se -= 2;
					s += even[ep].fi;
					}
					else{ ep++; }
				}
				else{
					if( op < odd.size() && odd[op].se > 1 ){
						odd[op].se -= 2;
						s += odd[op].fi;
					}
					else{ op++; }
				}
			}
			ans.pb( s );
		}

		op = 0;
		ep = 0;
		rep(i,ans.size()){
			int fl = 0;
			while( op < odd.size() && odd[op].se < 1 ) op++;
			if( op < odd.size() ) {
								fl = 1;
								ans[i] += odd[op].fi;
							    odd[op].se -= 1;
							}
			if( fl == 0 ){
				while( ep < even.size() && even[ep].se < 1 ) ep++;
				if( ep < even.size() ){
					ans[i] += even[ep].fi;
					even[ep].se -= 1;
				}
			}
			rrep(j,clim){
				ans[i] += ans[i][j];
			}
		}

		rep(i,ans.size()){
			cout << ans[i] << " ";
		}
		cout << endl;
		return 0 ;
	}


#include <bits/stdc++.h>
#define ll long long
#define vl vector<ll>
#define fi first
#define se second
#define pii pair<int,int>
#define mp(a,b) make_pair(a,b)
#define pb(x) push_back(x)
#define mod	1000000007
#define rep(i,n) for( int i = 0; i < n; i++ )
#define rrep(i,n) for(int i = n - 1 ; i >= 0 ; i--)
#define myrep(i,a,b) for( int i = a; i <= b; i++ )

using namespace std ;

ll binPow(ll a ,ll b ,ll Mo){
    ll ans = 1;
    for (; b; b >>= 1, a = a * a % Mo)
        if (b&1) ans = ans * a % Mo;
    return ans;
}

int main()
	{
		ios_base::sync_with_stdio(false); cin.tie(0);
		int n;
		cin >> n;
		string s;
		cin >> s;
		set<int> d;
		for( int i = 1; i <= n/2; i++ ){
			if( n % i == 0 ){ d.insert(i);
							  d.insert(n/i);
							}
		}
		vector<int> divv;
		divv.assign(d.begin(),d.end());
		map<char,int> m;
		rep(i,n){
			m[s[i]]++;
		}
		vector<pair<char,int> > odd,even;
		int cnt = 0;
		for( map<char,int>::iterator it = m.begin(); it != m.end(); it++ ){
			if( it->second % 2 != 0 ) { cnt++; odd.pb(mp(it->first,it->second)); }
			else{ even.pb(mp(it->first,it->second)); }
		}

		int pos = 0;
		rrep(i,divv.size()){
				if( cnt > 0 && divv[i] % 2 == 0 ) continue;
				if( (n/divv[i]) < cnt ) continue;
				pos = i; break;
		}

		cnt = divv[pos];
		int clim = cnt/2;
		int st = n/cnt;
		cout << st << endl;
		if( cnt == 1 ){
			rep(i,s.length()){
				cout << s[i] << " ";
			}
			cout << endl;
			return 0;
		}
		int ep = 0;
		int op = 0;
		vector<string> ans;
		rep(i,st){
			string s = "";
			while( s.length() != clim ){
				if( ep < even.size() ){
					if( even[ep].se > 0 ){
					even[ep].se -= 2;
					s += even[ep].fi;
					}
					else{ ep++; }
				}
				else{
					if( odd[op].se > 1 ){
						odd[op].se -= 2;
						s += odd[op].fi;
					}
					else{ op++; }
				}
			}
			ans.pb( s );
		}

		op = 0;
		rep(i,ans.size()){
			while( op < odd.size() && odd[op].se < 1 ) op++;
			if( op < odd.size() ) {
								ans[i] += odd[op].fi;
							    odd[op].se -= 1;
							}
			rrep(j,clim){
				ans[i] += ans[i][j];
			}
		}

		rep(i,ans.size()){
			cout << ans[i] << " ";
		}
		cout << endl;
		return 0 ;
	}


#include <bits/stdc++.h>

using namespace std;

const int N = 256, MAX = 400005;

int cnt[N];

int main() {
#ifndef ONLINE_JUDGE
  freopen("input.in", "r", stdin);
#endif
  int n;
  string s;
  cin >> n >> s;
  for (int i = 0; i < n; ++i) {
    ++cnt[(int)s[i]];
  }
  vector<char> odds;
  for (int i = 0; i < N; ++i) {
    if (cnt[i] % 2 == 1) {
      odds.push_back(i);
      --cnt[i];
    }
  }
  int sum = 0;
  for (int i = 0; i < N; ++i) {
    cnt[i] /= 2;
    sum += cnt[i];
  }
  if (odds.size() <= 1 || (!odds.empty() && sum % odds.size() != 0)) {
    string pal;
    for (int i = 0; i < N; ++i) {
      if (cnt[i]) {
        pal += string(cnt[i], i);
      }
    }
    string tmp = pal;
    reverse(tmp.begin(), tmp.end());
    if (!odds.empty()) {
      pal += odds[0];
    }
    pal += tmp;
    if (odds.size() > 1) {
      cout << 0 << endl;
    } else {
      cout << 1 << endl << pal << endl;
    }
    return 0;
  }
  int len = sum / odds.size();
  vector<string> v(odds.size());
  char cur = 'A';
  for (int i = 0; i < (int)odds.size(); ++i) {
    while ((int)v[i].size() < len) {
      while (cnt[(int)cur] == 0) {
        ++cur;
      }
      v[i] += cur;
      --cnt[(int)cur];
    }
  }
  cout << odds.size() << endl;
  for (int i = 0; i < (int)odds.size(); ++i) {
    string tmp = v[i];
    reverse(tmp.begin(), tmp.end());
    v[i] += odds[i];
    v[i] += tmp;
    cout << v[i] << " \n"[i + 1 == (int)odds.size()];
  }
}


#include <bits/stdc++.h>

using namespace std;

const int N = 256, MAX = 400005;

int cnt[N];

int main() {
#ifndef ONLINE_JUDGE
  freopen("input.in", "r", stdin);
#endif
  int n;
  string s;
  cin >> n >> s;
  for (int i = 0; i < n; ++i) {
    ++cnt[(int)s[i]];
  }
  vector<char> odds;
  for (int i = 0; i < N; ++i) {
    if (cnt[i] % 2 == 1) {
      odds.push_back(i);
      --cnt[i];
    }
  }
  int sum = 0;
  for (int i = 0; i < N; ++i) {
    cnt[i] /= 2;
    sum += cnt[i];
  }
  if (odds.size() <= 1 || (!odds.empty() && sum % odds.size() != 0)) {
    string pal;
    for (int i = 0; i < N; ++i) {
      if (cnt[i]) {
        pal += string(cnt[i], i);
      }
    }
    string tmp = pal;
    reverse(tmp.begin(), tmp.end());
    if (!odds.empty()) {
      pal += odds[0];
    }
    pal += tmp;
    cout << 1 << endl << pal << endl;
    return 0;
  }
  int len = sum / odds.size();
  vector<string> v(odds.size());
  char cur = 'A';
  for (int i = 0; i < (int)odds.size(); ++i) {
    while ((int)v[i].size() < len) {
      while (cnt[(int)cur] == 0) {
        ++cur;
      }
      v[i] += cur;
      --cnt[(int)cur];
    }
  }
  cout << odds.size() << endl;
  for (int i = 0; i < (int)odds.size(); ++i) {
    string tmp = v[i];
    reverse(tmp.begin(), tmp.end());
    v[i] += odds[i];
    v[i] += tmp;
    cout << v[i] << " \n"[i + 1 == (int)odds.size()];
  }
}


#include <bits/stdc++.h>

using namespace std;

const int N = 256;

int cnt[N];

int main() {
#ifndef ONLINE_JUDGE
  freopen("input.in", "r", stdin);
#endif
  int n;
  string s;
  cin >> n >> s;
  for (int i = 0; i < n; ++i) {
    ++cnt[(int)s[i]];
  }
  vector<char> odds;
  for (int i = 0; i < N; ++i) {
    if (cnt[i] % 2 == 1) {
      odds.push_back(i);
      --cnt[i];
    }
  }
  if (odds.empty()) {
    string pal;
    for (int i = 0; i < N; ++i) {
      if (cnt[i]) {
        pal += string(cnt[i] / 2, i);
      }
    }
    string tmp = pal;
    reverse(tmp.begin(), tmp.end());
    pal += tmp;
    cout << 1 << endl << pal << endl;
    return 0;
  }

  int sum = 0;
  for (int i = 0; i < N; ++i) {
    cnt[i] /= 2;
    sum += cnt[i];
  }

  if (sum % odds.size() != 0) {
    cout << s.size() << endl;
    for (int i = 0; i < (int)s.size(); ++i) {
      cout << s[i] << " \n"[i + 1 == (int)s.size()];
    }
    return 0;
  }

  int len = sum / odds.size();
  vector<string> v(odds.size());
  char cur = 'A';
  for (int i = 0; i < (int)odds.size(); ++i) {
    while ((int)v[i].size() < len) {
      while (cnt[(int)cur] == 0) {
        ++cur;
      }
      v[i] += cur;
      --cnt[(int)cur];
    }
  }
  cout << odds.size() << endl;
  for (int i = 0; i < (int)odds.size(); ++i) {
    string tmp = v[i];
    reverse(tmp.begin(), tmp.end());
    v[i] += odds[i];
    v[i] += tmp;
    cout << v[i] << " \n"[i + 1 == (int)odds.size()];
  }
}


#include <bits/stdc++.h>

using namespace std;

const int N = 127, MAX = 400005;

int cnt[N];

int main() {
#ifndef ONLINE_JUDGE
  freopen("input.in", "r", stdin);
#endif
  int n;
  string s;
  cin >> n >> s;
  for (int i = 0; i < n; ++i) {
    ++cnt[(int)s[i]];
  }
  vector<char> odds;
  int even_sum = 0;
  for (int i = 0; i < N; ++i) {
    if (cnt[i] % 2 == 1) {
      odds.push_back(i);
      --cnt[i];
    }
    even_sum += cnt[i];
  }

  int len = MAX - 1;
  while (len < MAX && (n % len != 0 || (len % 2 == 0 && !odds.empty()) ||
      (len % 2 == 1 && ((n / len - odds.size()) % 2 != 0 ||
      even_sum < (n / len - (int)odds.size()))))) {

//    if (n % len == 0 &&
//        (len % 2 == 0 && odds.empty() ||
//            ))

    --len;
  }

  int m = n / len;
  char cur = 0;
  int rem = m - odds.size();
  for (int i = 0; len % 2 == 1 && i < rem; ++i) {
    while (cur < N && cnt[(int)cur] == 0) {
      ++cur;
    }
    if (cur < N) {
      odds.push_back(cur);
      --cnt[(int)cur];
    }
  }

  vector<string> res(m);
  cur = 0;
  for (int i = 0; i < m; ++i) {
    while (cur < N && (int)res[i].size() < len / 2) {
      while (cur < N && cnt[(int)cur] == 0) {
        ++cur;
      }
      if (cur < N) {
        res[i] += cur;
        cnt[(int)cur] -= 2;
      }
    }
  }

  cout << m << endl;
  for (int i = 0; i < m; ++i) {
    string tmp = res[i];
    reverse(tmp.begin(), tmp.end());
    if (len % 2 == 1) {
      res[i] += odds[i];
    }
    res[i] += tmp;
    cout << res[i] << " \n"[i + 1 == m];
  }
}


#include <bits/stdc++.h>

using namespace std;

const int N = 256, MAX = 400005;

int cnt[N];

int main() {
#ifndef ONLINE_JUDGE
  freopen("input.in", "r", stdin);
#endif
  int n;
  string s;
  cin >> n >> s;
  for (int i = 0; i < n; ++i) {
    ++cnt[(int)s[i]];
  }
  vector<char> odds;
  for (int i = 0; i < N; ++i) {
    if (cnt[i] % 2 == 1) {
      odds.push_back(i);
      --cnt[i];
    }
  }
  int sum = 0;
  for (int i = 0; i < N; ++i) {
    cnt[i] /= 2;
    sum += cnt[i];
  }
  if (odds.size() <= 1 || (!odds.empty() && sum % odds.size() != 0)) {
    string pal;
    for (int i = 0; i < N; ++i) {
      if (cnt[i]) {
        pal += string(cnt[i], i);
      }
    }
    string tmp = pal;
    reverse(tmp.begin(), tmp.end());
    if (!odds.empty()) {
      pal += odds[0];
    }
    pal += tmp;
    if (odds.size() > 1) {
      cout << s.size() << endl;
      for (int i = 0; i < (int)s.size(); ++i) {
        cout << s[i] << " \n"[i + 1 == (int)s.size()];
      }
    } else {
      cout << 1 << endl << pal << endl;
    }
    return 0;
  }
  int len = sum / odds.size();
  vector<string> v(odds.size());
  char cur = 'A';
  for (int i = 0; i < (int)odds.size(); ++i) {
    while ((int)v[i].size() < len) {
      while (cnt[(int)cur] == 0) {
        ++cur;
      }
      v[i] += cur;
      --cnt[(int)cur];
    }
  }
  cout << odds.size() << endl;
  for (int i = 0; i < (int)odds.size(); ++i) {
    string tmp = v[i];
    reverse(tmp.begin(), tmp.end());
    v[i] += odds[i];
    v[i] += tmp;
    cout << v[i] << " \n"[i + 1 == (int)odds.size()];
  }
}


#include <bits/stdc++.h>

using namespace std;

const int N = 127, MAX = 400005;

int cnt[N];

int main() {
#ifndef ONLINE_JUDGE
  freopen("input.in", "r", stdin);
#endif
  int n;
  string s;
  cin >> n >> s;
  for (int i = 0; i < n; ++i) {
    ++cnt[(int)s[i]];
  }
  vector<char> odds;
  int even_sum = 0;
  for (int i = 0; i < N; ++i) {
    if (cnt[i] % 2 == 1) {
      odds.push_back(i);
      --cnt[i];
    }
    even_sum += cnt[i];
  }

  int len = MAX - 1;
  while (len < MAX
      && (n % len != 0 || (len % 2 == 0 && !odds.empty())
          || (len % 2 == 1
              && (n / len < (int) odds.size()
                  || (n / len - odds.size()) % 2 != 0
                  || even_sum < (n / len - (int) odds.size()))))) {
    --len;
  }

  int m = n / len;
  char cur = 0;
  int rem = m - odds.size();
  for (int i = 0; len % 2 == 1 && i < rem; ++i) {
    while (cur < N && cnt[(int)cur] == 0) {
      ++cur;
    }
    if (cur < N) {
      odds.push_back(cur);
      --cnt[(int)cur];
    }
  }

  vector<string> res(m);
  cur = 0;
  for (int i = 0; i < m; ++i) {
    while (cur < N && (int)res[i].size() < len / 2) {
      while (cur < N && cnt[(int)cur] == 0) {
        ++cur;
      }
      if (cur < N) {
        res[i] += cur;
        cnt[(int)cur] -= 2;
      }
    }
  }

  cout << m << endl;
  for (int i = 0; i < m; ++i) {
    string tmp = res[i];
    reverse(tmp.begin(), tmp.end());
    if (len % 2 == 1) {
      res[i] += odds[i];
    }
    res[i] += tmp;
    cout << res[i] << " \n"[i + 1 == m];
  }
}


#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <cstdlib>
#include <stack>
#include <vector>
#define INF 0x3f3f3f3f
#define MOD 1000000009
typedef long long ll;

using namespace std;
char a[400010];
int ying[400010];
int sum[100];
char yi[400010];
char er[400010];
int main()
{
    int n;
    cin >> n;
    cin >> a;
    memset(sum, 0, sizeof(sum));
    for(int i = 0; i < n; i++)
    {
        int num;
        if(a[i] >= 'a' && a[i] <= 'z')
        num = a[i]-'a';
        if(a[i] >= 'A' && a[i] <= 'Z')
        num = a[i]-'A'+26;
        if(a[i] >= '0' && a[i] <= '9')
        num = a[i]-'0'+26+26;
        sum[num]++;
    }
    int two = 0;
    int one = 0;
    for(int i = 0; i < 70; i++)
    {
        char ch;
            if(i >= 0 && i < 26)ch = 'a'+i;
            if(i >= 26 && i < 51)ch = 'A'+i-26;
            if(i >= 51 && i <= 61)ch = '0'+i-52;
        int kk = sum[i];
//        if(kk > 0)cout << kk << endl;
        while(kk > 1)
        {
            er[two++] = ch;
            kk -= 2;
        }
        if(kk == 1)yi[one++] = ch;
    }
//    cout << one << ' '<< two << endl;
    int ji = 0;
    for(int i = 1; i*i <= n; i++)
    {
        if(n%i == 0)
        {
            ying[ji++] = i;
            if(i != n/i)ying[ji++] = n/i;
        }
    }
    if(one == 0 && n%2 == 0)
    {
        cout << 1 << endl;
        for(int i = 0; i < two; i++)
        {
            cout << er[i];
        }
        for(int i = two-1; i >= 0; i--)
        {
            cout << er[i];
        }
        cout << ' '<< endl;
    }
    else if(one == 0 && n%2 == 1)
    {
        cout << 1 << endl;
        int two1 = two;
        for(int i = 0; i < two; i++)
        {
            cout << er[i];
        }
        cout << yi[0];
        two1 = two;
        for(int i = two-1; i >= 0; i--)
        {
            cout << er[i];
        }
        cout << ' '<< endl;
    }
    else
    {
        for(int i = 0; i < ji; i++)
        {
            if(one == ying[i])
            {
                if((n/one)%2 == 1)
                {
                    cout << one << endl;
                    int one1 = one;
                    for(int h = 0; h < one1; h++)
                    {
                        stack<char> s;
                        while(!s.empty())s.pop();
                        for(int hh = 0; hh < n/one1/2; hh++)
                        {
                            cout << er[--two];
                            s.push(er[two]);
                        }
                        cout << yi[--one];
                        while(!s.empty())
                        {
                            cout << s.top();
                            s.pop();
                        }
                        cout << ' ';
                    }
                    cout << endl;
                    return 0;
                }

            }
        }

        cout << n << endl;
        for(int i = 0; i < n; i++)
        {
            cout << a[i] << ' ';
//            if(i == 0)cout << a[i];
//            else cout << ' ' << a[i];
        }
        cout << endl;
    }
//    if(n%2 == 0)
//    {
//        int sum1 = 0;
//        int nn = n;
//        while(nn%2 == 0)
//        {
//            sum1++;
//            nn /= 2;
//        }
//        if(one%2 == )
//    }
//    else
//    {
//        if(one <= 1)
////        {
//            char ok;
//            for(int i = 0; i < 70; i++)
//            {
//                char ch;
//                if(i >= 0 && i <= 26)ch = 'a';
//                if(i >= 27 && i <= 51)ch = 'A';
//                if(i >= 52 && i <= 61)ch = '1';
//                if(sum[i]%2 == 1)
//                {
//                    sum[i]--;
//                    ok = ch;
//                }
//                while(sum[i])
//                {
//                    cout << i+ch;
//                    sum[i] /= 2;
//                }
//            }
//            cout << ok << endl;
//        }
//        else
//        {
//            for(int i = 0; i < n; i++)
//            {
//                if(i == 0)cout << a[i];
//                else cout << ' ' << a[i];
//            }
//            cout << endl;
//        }
//    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <cstdlib>
#include <stack>
#include <vector>
#define INF 0x3f3f3f3f
#define MOD 1000000009
typedef long long ll;

using namespace std;
char a[400010];
int ying[400010];
int sum[100];
char yi[400010];
char er[400010];
int main()
{
    int n;
    cin >> n;
    cin >> a;
    memset(sum, 0, sizeof(sum));
    for(int i = 0; i < n; i++)
    {
        int num;
        if(a[i] >= 'a' && a[i] <= 'z')
        num = a[i]-'a';
        if(a[i] >= 'A' && a[i] <= 'Z')
        num = a[i]-'A'+26;
        if(a[i] >= '0' && a[i] <= '9')
        num = a[i]-'0'+26+26;
        sum[num]++;
    }
    int two = 0;
    int one = 0;
    for(int i = 0; i < 70; i++)
    {
        char ch;
            if(i >= 0 && i < 26)ch = 'a'+i;
            if(i >= 26 && i < 51)ch = 'A'+i-26;
            if(i >= 51 && i <= 61)ch = '0'+i-52;
        int kk = sum[i];
//        if(kk > 0)cout << kk << endl;
        while(kk > 1)
        {
            er[two++] = ch;
            kk -= 2;
        }
        if(kk == 1)yi[one++] = ch;
    }
//    cout << one << ' '<< two << endl;
    int ji = 0;
    for(int i = 1; i*i <= n; i++)
    {
        if(n%i == 0)
        {
            ying[ji++] = i;
            if(i != n/i)ying[ji++] = n/i;
        }
    }
    if(one == 0 && n%2 == 0)
    {
        cout << 1 << endl;
        int two1 = two;
        for(int i = 0; i < two; i++)
        {
            cout << er[i];
        }
        two1 = two;
        for(int i = two-1; i >= 0; i--)
        {
            cout << er[i];
        }
        cout << endl;
    }
    else if(one == 0 && n%2 == 1)
    {
        cout << 1 << endl;
        int two1 = two;
        for(int i = 0; i < two; i++)
        {
            cout << er[i];
        }
        cout << yi[0];
        two1 = two;
        for(int i = two-1; i >= 0; i--)
        {
            cout << er[i];
        }
        cout << endl;
    }
    else
    {
        for(int i = 0; i < ji; i++)
        {
            if(one == ying[i])
            {
                if((n/one)%2 == 1)
                {
                    cout << one << endl;
                    int one1 = one;
                    for(int h = 0; h < one1; h++)
                    {
                        stack<char> s;
                        if(h != 0)cout << ' ';
                        for(int hh = 0; hh < n/one1/2; hh++)
                        {
                            cout << er[--two];
                            s.push(er[two]);
                        }
                        cout << yi[--one];
                        while(!s.empty())
                        {
                            cout << s.top();
                            s.pop();
                        }
                    }
                    cout << endl;
                    return 0;
                }

            }
        }

        cout << n << endl;
        for(int i = 0; i < n; i++)
        {
            if(i == 0)cout << a[i];
            else cout << ' ' << a[i];
        }
        cout << endl;
    }
//    if(n%2 == 0)
//    {
//        int sum1 = 0;
//        int nn = n;
//        while(nn%2 == 0)
//        {
//            sum1++;
//            nn /= 2;
//        }
//        if(one%2 == )
//    }
//    else
//    {
//        if(one <= 1)
////        {
//            char ok;
//            for(int i = 0; i < 70; i++)
//            {
//                char ch;
//                if(i >= 0 && i <= 26)ch = 'a';
//                if(i >= 27 && i <= 51)ch = 'A';
//                if(i >= 52 && i <= 61)ch = '1';
//                if(sum[i]%2 == 1)
//                {
//                    sum[i]--;
//                    ok = ch;
//                }
//                while(sum[i])
//                {
//                    cout << i+ch;
//                    sum[i] /= 2;
//                }
//            }
//            cout << ok << endl;
//        }
//        else
//        {
//            for(int i = 0; i < n; i++)
//            {
//                if(i == 0)cout << a[i];
//                else cout << ' ' << a[i];
//            }
//            cout << endl;
//        }
//    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <cstdlib>
#include <stack>
#include <vector>
#define INF 0x3f3f3f3f
#define MOD 1000000009
typedef long long ll;

using namespace std;
char a[500010];
int ying[500010];
int sum[1000];
char yi[500010];
char er[500010];
int main()
{
    int n;
    cin >> n;
    scanf("%s", a);
    memset(sum, 0, sizeof(sum));
    for(int i = 0; i < n; i++)
    {
        int num;
        if(a[i] >= 'a' && a[i] <= 'z')
        num = a[i]-'a';
        if(a[i] >= 'A' && a[i] <= 'Z')
        num = a[i]-'A'+26;
        if(a[i] >= '0' && a[i] <= '9')
        num = a[i]-'0'+26+26;
        sum[num]++;
    }
    int two = 0;
    int one = 0;
    for(int i = 0; i < 70; i++)
    {
        char ch;
            if(i >= 0 && i < 26)ch = 'a'+i;
            if(i >= 26 && i < 51)ch = 'A'+i-26;
            if(i >= 51 && i <= 61)ch = '0'+i-52;
        int kk = sum[i];
//        if(kk > 0)cout << kk << endl;
        while(kk > 1)
        {
            er[two++] = ch;
            kk -= 2;
        }
        if(kk == 1)yi[one++] = ch;
    }
//    cout << one << ' '<< two << endl;
    int ji = 0;
    for(int i = 1; i*i <= n; i++)
    {
        if(n%i == 0)
        {
            ying[ji++] = i;
            if(i != n/i)ying[ji++] = n/i;
        }
    }
    if(one == 0 && n%2 == 0)
    {
        cout << 1 << endl;
        for(int i = 0; i < two; i++)
        {
            cout << er[i];
        }
        for(int i = two-1; i >= 0; i--)
        {
            cout << er[i];
        }
        cout << ' '<< endl;
    }
    else
    {
        for(int i = 0; i < ji; i++)
        {
            if(one == ying[i])
            {
                int mm = n/one;
                while(mm%2 != 1)
                {
                    yi[one++] = er[--two];
                    yi[one++] = er[two];
                    mm = n/one;
                }
                if(mm%2 == 1)
                {
                    cout << one << endl;
                    int one1 = one;
                    for(int h = 0; h < one1; h++)
                    {
                        stack<char> s;
                        while(!s.empty())s.pop();
                        for(int hh = 0; hh < n/one1/2; hh++)
                        {
                            cout << er[--two];
                            s.push(er[two]);
                        }
                        cout << yi[--one];
                        while(!s.empty())
                        {
                            cout << s.top();
                            s.pop();
                        }
                        cout << ' ';
                    }
                    cout << endl;
                    return 0;
                }

            }
        }

        cout << n << endl;
        for(int i = 0; i < n; i++)
        {
            cout << a[i] << ' ';
//            if(i == 0)cout << a[i];
//            else cout << ' ' << a[i];
        }
        cout << endl;
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <cstdlib>
#include <stack>
#include <vector>
#define INF 0x3f3f3f3f
#define MOD 1000000009
typedef long long ll;

using namespace std;
char a[400010];
int ying[400010];
int sum[100];
char yi[400010];
char er[400010];
int main()
{
    int n;
    cin >> n;
    cin >> a;
    memset(sum, 0, sizeof(sum));
    for(int i = 0; i < n; i++)
    {
        int num;
        if(a[i] >= 'a' && a[i] <= 'z')
        num = a[i]-'a';
        if(a[i] >= 'A' && a[i] <= 'Z')
        num = a[i]-'A'+26;
        if(a[i] >= '0' && a[i] <= '9')
        num = a[i]-'0'+26+26;
        sum[num]++;
    }
    int two = 0;
    int one = 0;
    for(int i = 0; i < 70; i++)
    {
        char ch;
            if(i >= 0 && i < 26)ch = 'a'+i;
            if(i >= 26 && i < 51)ch = 'A'+i-26;
            if(i >= 51 && i <= 61)ch = '0'+i-52;
        int kk = sum[i];
//        if(kk > 0)cout << kk << endl;
        while(kk > 1)
        {
            er[two++] = ch;
            kk -= 2;
        }
        if(kk == 1)yi[one++] = ch;
    }
//    cout << one << ' '<< two << endl;
    int ji = 0;
    for(int i = 1; i*i <= n; i++)
    {
        if(n%i == 0)
        {
            ying[ji++] = i;
            if(i != n/i)ying[ji++] = n/i;
        }
    }
    if(one == 0 && n%2 == 0)
    {
        cout << 1 << endl;
        int two1 = two;
        for(int i = 0; i < two; i++)
        {
            cout << er[i];
        }
        two1 = two;
        for(int i = two-1; i >= 0; i--)
        {
            cout << er[i];
        }
        cout << endl;
    }
    else if(one == 0 && n%2 == 1)
    {
        cout << 1 << endl;
        int two1 = two;
        for(int i = 0; i < two; i++)
        {
            cout << er[i];
        }
        cout << yi[0];
        two1 = two;
        for(int i = two-1; i >= 0; i--)
        {
            cout << er[i];
        }
        cout << endl;
    }
    else
    {
        for(int i = 0; i < ji; i++)
        {
            if(one == ying[i])
            {
                if((n/one)%2 == 1)
                {
                    cout << one << endl;
                    int one1 = one;
                    for(int h = 0; h < one1; h++)
                    {
                        stack<char> s;
                        for(int hh = 0; hh < n/one1/2; hh++)
                        {
                            cout << er[--two];
                            s.push(er[two]);
                        }
                        cout << yi[--one];
                        while(!s.empty())
                        {
                            cout << s.top();
                            s.pop();
                        }
                        cout << ' ';
                    }
                    cout << endl;
                    return 0;
                }

            }
        }

        cout << n << endl;
        for(int i = 0; i < n; i++)
        {
            cout << a[i] << ' ';
//            if(i == 0)cout << a[i];
//            else cout << ' ' << a[i];
        }
        cout << endl;
    }
//    if(n%2 == 0)
//    {
//        int sum1 = 0;
//        int nn = n;
//        while(nn%2 == 0)
//        {
//            sum1++;
//            nn /= 2;
//        }
//        if(one%2 == )
//    }
//    else
//    {
//        if(one <= 1)
////        {
//            char ok;
//            for(int i = 0; i < 70; i++)
//            {
//                char ch;
//                if(i >= 0 && i <= 26)ch = 'a';
//                if(i >= 27 && i <= 51)ch = 'A';
//                if(i >= 52 && i <= 61)ch = '1';
//                if(sum[i]%2 == 1)
//                {
//                    sum[i]--;
//                    ok = ch;
//                }
//                while(sum[i])
//                {
//                    cout << i+ch;
//                    sum[i] /= 2;
//                }
//            }
//            cout << ok << endl;
//        }
//        else
//        {
//            for(int i = 0; i < n; i++)
//            {
//                if(i == 0)cout << a[i];
//                else cout << ' ' << a[i];
//            }
//            cout << endl;
//        }
//    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <cstdlib>
#include <stack>
#include <vector>
#define INF 0x3f3f3f3f
#define MOD 1000000009
typedef long long ll;

using namespace std;
char a[500010];
int ying[500010];
int sum[1000];
char yi[500010];
char er[500010];
int main()
{
    int n;
    cin >> n;
    scanf("%s", a);
    memset(sum, 0, sizeof(sum));
    for(int i = 0; i < n; i++)
    {
        int num;
        if(a[i] >= 'a' && a[i] <= 'z')
        num = a[i]-'a';
        if(a[i] >= 'A' && a[i] <= 'Z')
        num = a[i]-'A'+26;
        if(a[i] >= '0' && a[i] <= '9')
        num = a[i]-'0'+26+26;
        sum[num]++;
    }
    int two = 0;
    int one = 0;
    for(int i = 0; i < 70; i++)
    {
        char ch;
            if(i >= 0 && i < 26)ch = 'a'+i;
            if(i >= 26 && i < 51)ch = 'A'+i-26;
            if(i >= 51 && i <= 61)ch = '0'+i-52;
        int kk = sum[i];
//        if(kk > 0)cout << kk << endl;
        while(kk > 1)
        {
            er[two++] = ch;
            kk -= 2;
        }
        if(kk == 1)yi[one++] = ch;
    }
//    cout << one << ' '<< two << endl;
    int ji = 0;
    for(int i = 1; i*i <= n; i++)
    {
        if(n%i == 0)
        {
            ying[ji++] = i;
            if(i != n/i)ying[ji++] = n/i;
        }
    }
    if(one == 0 && n%2 == 0)
    {
        cout << 1 << endl;
        for(int i = 0; i < two; i++)
        {
            cout << er[i];
        }
        for(int i = two-1; i >= 0; i--)
        {
            cout << er[i];
        }
        cout << ' '<< endl;
    }
    else
    {
        for(int i = 0; i < ji; i++)
        {
            if(one == ying[i])
            {
                if((n/one)%2 == 1)
                {
                    cout << one << endl;
                    int one1 = one;
                    for(int h = 0; h < one1; h++)
                    {
                        stack<char> s;
                        while(!s.empty())s.pop();
                        for(int hh = 0; hh < n/one1/2; hh++)
                        {
                            cout << er[--two];
                            s.push(er[two]);
                        }
                        cout << yi[--one];
                        while(!s.empty())
                        {
                            cout << s.top();
                            s.pop();
                        }
                        cout << ' ';
                    }
                    cout << endl;
                    return 0;
                }

            }
        }

        cout << n << endl;
        for(int i = 0; i < n; i++)
        {
            cout << a[i] << ' ';
//            if(i == 0)cout << a[i];
//            else cout << ' ' << a[i];
        }
        cout << endl;
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <cstdlib>
#include <stack>
#include <vector>
#define INF 0x3f3f3f3f
#define MOD 1000000009
typedef long long ll;

using namespace std;
char a[500010];
int ying[500010];
int sum[1000];
char yi[500010];
char er[500010];
set<char> s;
int main()
{
    int n;
    cin >> n;
    scanf("%s", a);
    memset(sum, 0, sizeof(sum));
    int one = 0;
    int two = 0;
    for(int i = 0; i < n; i++)
    {
        if(s.count(a[i]) == 0)
        {
            s.insert(a[i]);
        }
        else
        {
            er[two++] = a[i];
            s.erase(a[i]);
        }
    }
    for(set<char>::iterator it = s.begin(); it != s.end(); it++)
    {
        yi[one++] = *it;
    }
    if(one == 0)
    {
        cout << 1 << endl;
        for(int i = 0; i < two; i++)
        cout << er[i];
        for(int i = two-1; i >= 0; i--)
        cout << er[i];
        cout << endl;
    }
    else
    {
        int mm = n/one;
        while((mm%2 != 1 || n/one*one != n) && one <= n)
        {
            yi[one++] = er[--two];
            yi[one++] = er[two];
            mm = n/one;
        }
        if(mm%2 == 1 && n/mm*mm == n)
        {
            cout << one << endl;
            int one1 = one;
            for(int i = 0; i < one1; i++)
            {
                stack<char> ss;
                for(int i = 0; i < n/one1/2; i++)
                {
                    cout << er[--two];
                    ss.push(er[two]);
                }
                cout << yi[--one];
                while(!ss.empty())
                {
                    cout << ss.top();
                    ss.pop();
                }
                cout << ' ';
            }
            cout << endl;
        }
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <cstdlib>
#include <stack>
#include <vector>
#define INF 0x3f3f3f3f
#define MOD 1000000009
typedef long long ll;

using namespace std;
char a[500010];
int ying[500010];
int sum[1000];
char yi[500010];
char er[500010];
set<char> s;
int main()
{
    int n;
    cin >> n;
    scanf("%s", a);
    memset(sum, 0, sizeof(sum));
    int one = 0;
    int two = 0;
    for(int i = 0; i < n; i++)
    {
        if(s.count(a[i]) == 0)
        {
            s.insert(a[i]);
        }
        else
        {
            er[two++] = a[i];
            s.erase(a[i]);
        }
    }
    for(set<char>::iterator it = s.begin(); it != s.end(); it++)
    {
        yi[one++] = *it;
    }
    if(one == 0)
    {
        cout << 1 << endl;
        for(int i = 0; i < two; i++)
        cout << er[i];
        for(int i = two-1; i >= 0; i--)
        cout << er[i];
        cout << endl;
    }
    else
    {
        int mm = n/one;
        while((mm%2 != 1 || n/one*one != n) && one <= n)
        {
            yi[one++] = er[--two];
            yi[one++] = er[two];
            mm = n/one;
        }
        if(mm%2 == 1 && n/mm*mm == n)
        {
            cout << one << endl;
            int one1 = one;
            for(int i = 0; i < one1; i++)
            {
                stack<char> ss;
                for(int i = 0; i < n/one1/2; i++)
                {
                    cout << er[--two];
                    ss.push(er[two]);
                }
                cout << yi[--one];
                while(!ss.empty())
                {
                    cout << ss.top();
                    ss.pop();
                }
                cout << ' ';
            }
            cout << endl;
        }
        else
        {
            cout << n << endl;
            for(int i = 0; i < n; i++)
            cout << a[i] << ' ';
            cout << endl;
        }
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <cstdlib>
#include <stack>
#include <vector>
#define INF 0x3f3f3f3f
#define MOD 1000000009
typedef long long ll;

using namespace std;
char a[500010];
int ying[500010];
int sum[1000];
char yi[500010];
char er[500010];
set<char> s;
int main()
{
    int n;
    cin >> n;
    scanf("%s", a);
    memset(sum, 0, sizeof(sum));
    int one = 0;
    int two = 0;
    for(int i = 0; i < n; i++)
    {
        if(s.count(a[i]) == 0)
        {
            s.insert(a[i]);
        }
        else
        {
            er[two++] = a[i];
            s.erase(a[i]);
        }
    }
    for(set<char>::iterator it = s.begin(); it != s.end(); it++)
    {
        yi[one++] = *it;
    }
    if(one == 0)
    {
        cout << 1 << endl;
        for(int i = 0; i < two; i++)
        cout << er[i];
        for(int i = two-1; i >= 0; i--)
        cout << er[i];
        cout << endl;
    }
    else
    {
        int mm = n/one;
        while(mm%2 != 1 || n/mm*mm != n)
        {
            yi[one++] = er[--two];
            yi[one++] = er[two];
            mm = n/one;
        }
        if(mm%2 == 1 && n/mm*mm)
        {
            cout << one << endl;
            int one1 = one;
            for(int i = 0; i < one1; i++)
            {
                stack<char> ss;
                for(int i = 0; i < n/one1/2; i++)
                {
                    cout << er[--two];
                    ss.push(er[two]);
                }
                cout << yi[--one];
                while(!ss.empty())
                {
                    cout << ss.top();
                    ss.pop();
                }
                cout << ' ';
            }
            cout << endl;
        }
    }
    return 0;
}