n = int(input())
s = list(input())
d = {}
for char in s:
    if char not in d.keys():
        d[char] = 1
    else:
        d[char] += 1

odd = []
even = []
for char in d.keys():
    for i in range(d[char] // 2):
        even.append(char)
        even.append(char)
    for i in range(d[char] % 2):
        odd.append(char)
print(len(even), len(odd))
if len(odd) <= 1:
    x = ''.join([even[i] for i in range(1, len(even), 2)])
    y = ''.join(odd)
    print(1)
    print(x + y + x[::-1])
elif len(even) % len(odd) == 0 and (len(even) // len(odd)) % 2 == 0 and (len(even) // len(odd)) > 0:
    print(len(odd))
    x = []
    ratio = len(even) // len(odd)
    indx = 0
    for i in range(len(odd)):
        tail = ''
        while len(tail) < ratio // 2:
            tail += even[indx]
            indx += 2
        x.append(tail + odd[i] + tail[::-1])
    print(' '.join(x))
else:
    ratio = len(even)//len(odd)
    max_length = 1
    for i in range(1,ratio+1,2):
        if (len(even)+len(odd)) % i == 0 and max_length < i:
            max_length = i
    parts = (len(even) + len(odd))//max_length
    print(parts)
    x = []
    indx = 0
    for i in range(len(odd)):
        tail = ''
        while len(tail) < max_length // 2:
            tail += even[indx]
            indx += 2
        x.append(tail + odd[i] + tail[::-1])
    middle = []
    for i in range(parts - len(odd)):
        middle.append(even.pop())
    for i in range(len(middle)):
        tail = ''
        while len(tail) < max_length // 2:
            tail += even[indx]
            indx += 2
        x.append(tail + middle[i] + tail[::-1])
    print(' '.join(x))


n = int(input())
s = list(input())
d = {}
for char in s:
    if char not in d.keys():
        d[char] = 1
    else:
        d[char] += 1

odd = []
even = []
for char in d.keys():
    for i in range(d[char] // 2):
        even.append(char)
        even.append(char)
    for i in range(d[char] % 2):
        odd.append(char)
# print(len(even), len(odd))
if len(odd) <= 1:
    x = ''.join([even[i] for i in range(1, len(even), 2)])
    y = ''.join(odd)
    print(1)
    print(x + y + x[::-1])
elif len(even) % len(odd) == 0 and (len(even) // len(odd)) % 2 == 0 and (len(even) // len(odd)) > 0:
    print(len(odd))
    x = []
    ratio = len(even) // len(odd)
    indx = 0
    for i in range(len(odd)):
        tail = ''
        while len(tail) < ratio // 2:
            tail += even[indx]
            indx += 2
        x.append(tail + odd[i] + tail[::-1])
    print(' '.join(x))
else:
    ratio = len(even)//len(odd)
    max_length = 1
    for i in range(1,ratio+1,2):
        if (len(even)+len(odd)) % i == 0 and max_length < i:
            max_length = i
    parts = (len(even) + len(odd))//max_length
    print(parts)
    x = []
    indx = 0
    for i in range(len(odd)):
        tail = ''
        while len(tail) < max_length // 2:
            tail += even[indx]
            indx += 2
        x.append(tail + odd[i] + tail[::-1])
    middle = []
    for i in range(parts - len(odd)):
        middle.append(even.pop())
    for i in range(len(middle)):
        tail = ''
        while len(tail) < max_length // 2:
            tail += even[indx]
            indx += 2
        x.append(tail + middle[i] + tail[::-1])
    print(' '.join(x))


n = int(input())
s = list(input())
d = {}
for char in s:
    if char not in d.keys():
        d[char] = 1
    else:
        d[char] += 1

odd = []
even = []
for char in d.keys():
    for i in range(d[char] // 2):
        even.append(char)
        even.append(char)
    for i in range(d[char] % 2):
        odd.append(char)

if len(odd) <= 1:
    x = ''.join([even[i] for i in range(1,len(even),2)])
    y = ''.join(odd)
    print(1)
    print(x+y+x[::-1])
elif (len(even)//len(odd)) % 2 == 0 and (len(even)//len(odd)) > 0:
    print(len(odd))
    x = []
    ratio = len(even)//len(odd)
    indx = 0
    for i in range(len(odd)):
        tail = ''
        while len(tail) < ratio//2:
            tail += even[indx]
            indx += 2
        x.append(tail+odd[i]+tail[::-1])
    print(' '.join(x))
else:
    print(len(even)//2 + len(odd))
    print((' '.join(even)+' '+ ' '.join(odd)).strip())


n = int(input)
str = int(input)
char = []
charPair = []
charImpair = []
for car in str:
	if car not in char:
		z = str.count(car)
		while z>1
			charPair.append(z)
			z-=2
		if(z==1)
			charImpair.append(z)
		char.append(z)
if len(charImpair) <=1 :
	String = ''
	for x in charPair:
		String += x
	if len(charImpair) ==1 :
		String += charImpair[0]
	for x in charPair[::-1]:
		String += x
	print('1')
	print(String)


n = int(input())
string = input()
char = []
charPair = []
charImpair = []
for car in string:
	if car not in char:
		z = string.count(car)
		while z>1:
			charPair.append(car)
			z-=2
		if(z==1):
			charImpair.append(car)
		char.append(car)
if len(charImpair) ==0 :
	String1 = ''
	for x in charPair:
		String1+= x
	if len(charImpair) ==1 :
		String1 += charImpair[0]
	for x in charPair[::-1]:
		String1 += x
	print('1')
	print(String1)
else :
	nbPalin = len(charImpair)
	while n%nbPalin != 0 :
		nbPalin += 2
		charImpair.append(charPair[-1])
		charImpair.append(charPair[-1])
		charPair.delete(charPair[-1])
	lenPalindrome = n/nbPalin
	Palin = []
	for i in range(nbPalin):
		String2 = ''
		for x in charPair[i : int(i + ((lenPalindrome-1)/2))]:
			String2 += x
		String2 += charImpair[i]
		for x in range(i + int(((lenPalindrome-1)/2))-1, i-1 ,-1):   #   charPair[i + int(((lenPalindrome-1)/2))-1: i-1 :-1]:
			String2 += charPair[x]
		Palin.append(String2)

	print(nbPalin)
	String3 = ' '.join(Palin)
	print(String3)


n = int(input())
string = input()
char = []
charPair = []
charImpair = []
for car in string:
	if car not in char:
		z = string.count(car)
		while z>1:
			charPair.append(car)
			z-=2
		if(z==1):
			charImpair.append(car)
		char.append(car)
if len(charImpair) ==0 :
	String1 = ''
	for x in charPair:
		String1+= x
	if len(charImpair) ==1 :
		String1 += charImpair[0]
	for x in charPair[::-1]:
		String1 += x
	print('1')
	print(String1)
else :
	nbPalin = len(charImpair)
	while len(charPair)%nbPalin != 0 :
		nbPalin += 2
		charImpair.append(charPair[-1])
		charImpair.append(charPair[-1])
		del(charPair[-1])
	lenPalindrome = n/nbPalin
	Palin = []
	for i in range(nbPalin):
		String2 = ''
		indice = i * int(((lenPalindrome-1)/2))
		for x in charPair[indice : int(indice + ((lenPalindrome-1)/2))]:
			String2 += x
		String2 += charImpair[i]
		for x in range(indice + int(((lenPalindrome-1)/2))-1, indice-1 ,-1):   #   charPair[i + int(((lenPalindrome-1)/2))-1: i-1 :-1]:
			String2 += charPair[x]
		Palin.append(String2)

	print(nbPalin)
	String3 = ' '.join(Palin)
	print(String3)


n=int(input())
s=list(input())
lets={}
for i in s:
    try:
        lets[i]+=1
    except:
        lets[i]=1
count=0
centre=[]
rest=''
for i in lets.keys():
    if(lets[i]%2):
        centre.append(i)
        count+=1
    rest+=str(i)*(lets[i]//2)
if(count==0):
    t=''
    for i in lets.keys():
        t=i*(lets[i]//2) + t + i*(lets[i]//2)
    print(1)
    print(t)

else:
    extra=0
    while(n%count!=0 and count<n):
        count+=2
        extra+=1
    for i in range(extra):
        centre+=[rest.pop()]*2
    amt=len(rest)//(count)

    print(count)
    for i in range(count):
        print(rest[i*(amt):(i+1)*amt] + centre[i] + rest[i*(amt):(i+1)*amt],end=' ')
    print()


n=int(input())
s=list(input())
lets={}
for i in s:
    try:
        lets[i]+=1
    except:
        lets[i]=1
count=0
centre=[]
rest=[]
for i in lets.keys():
    if(lets[i]%2):
        centre.append(i)
        count+=1
    rest+=[i]*(lets[i]//2)
if(count==0):
    t=''
    for i in lets.keys():
        t=i*(lets[i]//2) + t + i*(lets[i]//2)
    print(1)
    print(t)

else:
    extra=0
    while(n%count!=0 or (n//count)%2==0):
        count+=2
        extra+=1
    for i in range(extra):
        centre+=[rest.pop()]*2
    amt=len(rest)//(count)
    temp=rest.copy()
    rest=''
    for i in temp:
        rest+=i
    print(count)
    print(rest[0:amt] + centre[0] + rest[(1)*(amt)-1::-1],end=' ')
    for i in range(1,count):
        print(rest[i*(amt):(i+1)*amt] + centre[i] + rest[(i+1)*(amt)-1:(i)*amt-1:-1],end=' ')
    print()


n=int(input())
s=list(input())
lets={}
for i in s:
    try:
        lets[i]+=1
    except:
        lets[i]=1
count=0
centre=[]
rest=''
for i in lets.keys():
    if(lets[i]%2):
        centre.append(i)
        count+=1
    rest+=str(i)*(lets[i]//2)
if(count==0):
    t=''
    for i in lets.keys():
        t=i*(lets[i]//2) + t + i*(lets[i]//2)
    print(1)
    print(t)

else:
    extra=0
    while(n%count!=0 and count<n):
        count+=2
        extra+=1
    for i in range(extra):
        centre+=[rest.pop()]*2
    amt=len(rest)//(count)
    print(count)
    print(rest[0:amt] + centre[0] + rest[(1)*(amt)-1::-1],end=' ')
    for i in range(1,count):
        print(rest[i*(amt):(i+1)*amt] + centre[i] + rest[(i+1)*(amt)-1:(i)*amt-1:-1],end=' ')
    print()


mp,a,p={},[],[]
n=int(input())
for i in input():
    if i in mp:mp[i]+=1
    else:mp[i]=1
odd=0
for i in mp:
    if mp[i]&1:
        a.append(i)
        mp[i]-=1
        odd+=1
    if mp[i]:
        p.append(i)
m=max(1,odd)
for i in range(m,n+1):
    if not n%i:
        d=n//i
        if odd and not d&1:continue
        print(i)
        for K in range(i-m):
            a.append(p[-1])
            if mp[p[-1]]>1:mp[p[-1]]-=1
            else:p.pop()
        for k in range(i):
            s=''
            for j in range(d//2):
                s+=p[-1]
                mp[p[-1]]-=2
                if not mp[p[-1]]:p.pop()
            if odd:print(s+a.pop()+s[::-1],end=' ')
            else:print(s+s[::-1],end=' ')
        exit()


mp,a,p={},[],[]
n=int(input())
for i in input():
    if i in mp:mp[i]+=1
    else:mp[i]=1
odd=0
for i in mp:
    if mp[i]&1:
        a.append(i)
        mp[i]-=1
        odd+=1
    if mp[i]:
        p.append(i)
m=max(1,odd)
for i in range(m,n+1):
    if not n%i:
        d=n//i
        if odd and not d&1:continue
        print(i)
        for k in range(i):
            s=''
            for j in range(d//2):
                s+=p[-1]
                mp[p[-1]]-=2
                if not mp[p[-1]]:p.pop()
            if odd:print(s+a.pop()+s[::-1],end=' ')
            else:print(s+s[::-1],end=' ')
        exit()


from collections import Counter

n = int(input())
inp = input()

c = Counter(inp)

t = len(list(filter(lambda x: x % 2 == 1, list(c.values()))))

if t == 0:
    temp = sum([[list(c.items())[j][0]] * (list(c.items())[j][1] // 2) for j in range(len(c.items()))], [])
    print(temp)
    print(''.join(temp) + ''.join(temp[::-1]))

else:
    ones = list()
    for j in range(len(c.items())):
        i = list(c.items())[j]
        if i[1] % 2 == 1:
            c[list(c.keys())[j]] -= 1
            ones.append(i[0])
    others = sum([[list(c.items())[j][0]] * (list(c.items())[j][1]) for j in range(len(c.items()))], [])
    while n % t != 0:
        t += 2
        ones.append(others.pop())
        ones.append(others.pop())
    L = n // t
    ans = list()
    for i in range(t):
        temp = list()
        if L % 2 == 1:
            temp.append(ones.pop())
        for i in range(L // 2):
            temp.append(others.pop())
            temp.insert(0, others.pop())
        ans.append(''.join(temp))
    print(t)
    print(' '.join(ans))


from collections import Counter

n = int(input())
inp = input()

c = Counter(inp)

t = len(list(filter(lambda x: x % 2 == 1, list(c.values()))))

if t == 0:
    temp = sum([[list(c.items())[j][0]] * (list(c.items())[j][1] // 2) for j in range(len(c.items()))], [])

    print(1)
    print(''.join(temp) + ''.join(temp[::-1]))

else:
    ones = list()
    for j in range(len(c.items())):
        i = list(c.items())[j]
        if i[1] % 2 == 1:
            c[list(c.keys())[j]] -= 1
            ones.append(i[0])

    others = sum([[list(c.items())[j][0]] * (list(c.items())[j][1] // 2) for j in range(len(c.items()))], [])

    while n % t != 0 or n // t % 2 == 0:
        t += 2
        o = others.pop()
        ones.append(o)
        ones.append(o)
    L = n // t

    ans = list()
    ot = 0
    for i in range(t):
        mid = str()
        if L % 2 == 1:
            mid = ones[i]
        ln = L // 2
        ans.append(''.join(others[ot: ot + ln]) + mid + ''.join(others[ot: ot + ln][::-1]))
        ot += ln

    print(t)
    print(' '.join(ans))


from collections import Counter

n = int(input())
inp = input()

c = Counter(inp)

t = len(list(filter(lambda x: x % 2 == 1, list(c.values()))))

if t == 0:
    temp = sum([[list(c.items())[j][0]] * (list(c.items())[j][1] // 2) for j in range(len(c.items()))], [])

    print(1)
    print(''.join(temp) + ''.join(temp[::-1]))

else:
    ones = list()
    for j in range(len(c.items())):
        i = list(c.items())[j]
        if i[1] % 2 == 1:
            c[list(c.keys())[j]] -= 1
            ones.append(i[0])

    others = sum([[list(c.items())[j][0]] * (list(c.items())[j][1]) for j in range(len(c.items()))], [])

    while n % t != 0 or n // t % 2 == 0:
        t += 2
        ones.append(others.pop())
        ones.append(others.pop())
    L = n // t

    ans = list()
    for i in range(t):
        temp = list()
        if L % 2 == 1:
            temp.append(ones.pop())
        for i in range(L // 2):
            temp.append(others.pop())
            temp.insert(0, others.pop())
        ans.append(''.join(temp))

    print(t)
    print(' '.join(ans))


from collections import Counter

n = int(input())
inp = input()

c = Counter(inp)

t = len(list(filter(lambda x: x % 2 == 1, list(c.values()))))

if t == 0:
    temp = sum([[list(c.items())[j][0]] * (list(c.items())[j][1] // 2) for j in range(len(c.items()))], [])

    print(1)
    print(''.join(temp) + ''.join(temp[::-1]))

else:
    ones = list()
    for j in range(len(c.items())):
        i = list(c.items())[j]
        if i[1] % 2 == 1:
            c[list(c.keys())[j]] -= 1
            ones.append(i[0])

    others = sum([[list(c.items())[j][0]] * (list(c.items())[j][1]) for j in range(len(c.items()))], [])

    while n % t != 0:
        t += 2
        ones.append(others.pop())
        ones.append(others.pop())
    L = n // t

    ans = list()
    for i in range(t):
        temp = list()
        if L % 2 == 1:
            temp.append(ones.pop())
        for i in range(L // 2):
            temp.append(others.pop())
            temp.insert(0, others.pop())
        ans.append(''.join(temp))

    print(t)
    print(' '.join(ans))


from collections import Counter

n = int(input())
inp = input()

c = Counter(inp)

t = len(list(filter(lambda x: x % 2 == 1, list(c.values()))))

if t == 0:
    temp = sum([[list(c.items())[j][0]] * (list(c.items())[j][1] // 2) for j in range(len(c.items()))], [])
    print(temp)
    print(''.join(temp) + ''.join(temp[::-1]))

else:
    ones = list()
    for j in range(len(c.items())):
        i = list(c.items())[j]
        if i[1] % 2 == 1:
            c[list(c.keys())[j]] -= 1
            ones.append(i[0])
    others = sum([[list(c.items())[j][0]] * (list(c.items())[j][1]) for j in range(len(c.items()))], [])
    while n % t != 0:
        t += 2
        ones.append(others.pop())
        ones.append(others.pop())
    L = n // t
    ans = list()
    for i in range(t):
        temp = list()
        if L % 2 == 1:
            temp.append(ones.pop())
        for i in range(L // 2):
            temp.append(others.pop())
            temp.append(others.pop())
        ans.append(''.join(temp))
    print(t)
    print(' '.join(ans))


import sys
from collections import Counter

def gen(counter):
    for c, n in counter:
        for i in range(n // 2):
            yield c

def gen_o(counter):
    for c, n in counter:
        for i in range(n % 2):
            yield c

N = int(next(sys.stdin))

s = next(sys.stdin).strip()
c = Counter(s)

even = 0
odd = 0
items = list(c.items())
for _, n in items:
    even += n // 2
    odd += n % 2
generator = gen(items)
generator_o = gen_o(items)

odd_c = odd
if odd == 0:
    print(1)
    front = [next(generator) for i in range(len(s) // 2)]
    fs = "".join(front)
    print(fs + fs[::-1])
elif even % odd == 0:
    print(odd)
    per = even // odd
    strs = []
    for i in range(odd):
        front = [next(generator) for i in range(per)]
        fs = "".join(front)
        strs.append(fs + next(generator_o) + fs[::-1])
    print(" ".join(strs))
else:
    print(len(s))
    for ch in s:
        print(ch)


import sys
from collections import Counter

def gen(counter):
    for c, n in counter:
        for i in range(n // 2):
            yield c

def gen_o(counter):
    for c, n in counter:
        for i in range(n % 2):
            yield c

N = int(next(sys.stdin))

s = next(sys.stdin).strip()
c = Counter(s)

even = 0
odd = 0
items = list(c.items())
for _, n in items:
    even += n // 2
    odd += n % 2
generator = gen(items)
generator_o = gen_o(items)

odd_c = odd
if odd == 0:
    print(1)
    front = [next(generator) for i in range(len(s) // 2)]
    fs = "".join(front)
    print(fs + fs[::-1])
elif even % odd == 0:
    print(odd)
    per = even // odd
    strs = []
    for i in range(odd):
        front = [next(generator) for i in range(per)]
        fs = "".join(front)
        strs.append(fs + next(generator_o) + fs[::-1])
    print(" ".join(strs))
else:
    print(len(s))
    print(" ".join(c for c in s))


import sys
from collections import Counter

def gen(counter, skip):
    for c, n in counter:
        has = n // 2
        if skip > has:
            skip -= has
            has = 0
        elif skip > 0:
            has -= skip
            skip = 0
        for i in range(has):
            yield c

def gen_o(counter, take):
    for c, n in counter:
        for i in range(n % 2):
            yield c
    for c, n in counter:
        has = (n // 2) * 2
        if take > has:
            take -= has
        elif take > 0:
            has = take
            take = 0
        for i in range(has):
            yield c

N = int(next(sys.stdin))

s = next(sys.stdin).strip()
c = Counter(s)

even = 0
odd = 0
items = list(c.items())
for _, n in items:
    even += n // 2
    odd += n % 2
generator = gen(items, 0)
generator_o = gen_o(items, 0)

odd_c = odd
if odd == 0:
    print(1)
    front = [next(generator) for i in range(len(s) // 2)]
    fs = "".join(front)
    print(fs + fs[::-1])
else:
    skip = 0
    while even != 0 and even % odd != 0:
        skip += 1
        odd += 2
        even -= 1
    generator = gen(items, skip)
    generator_o = gen_o(items, skip * 2)
    print(odd)
    per = even // odd
    strs = []
    for i in range(odd):
        front = [next(generator) for i in range(per)]
        fs = "".join(front)
        strs.append(fs + next(generator_o) + fs[::-1])
    print(" ".join(strs))


# -*- coding: utf-8 -*-

import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys

"""
created by shhuan at 2017/10/22 18:15

"""

N = int(input())
S = input()

def split(wc, pl, n):

    ans = []

    while len(ans) < n:
        t = ''
        if pl % 2 == 1:
            u = ''
            for w, c in [(w, c) for w, c in wc.items()]:
                if c % 2 == 1:
                    u = w
                    break
            if not u:
                u = list([w for w, c in wc.items() if c > 0])[0]

            wc[u] -= 1

            for i in range(pl//2):
                for w, c in [(w, c) for w,c in wc.items()]:
                    if c > 1:
                        t += w
                        wc[w] -= 2
                        break
            t = t+u+t[::-1]
        else:
            for i in range(pl//2):
                for w, c in [(w, c) for w, c in wc.items()]:
                    if c >= 2:
                        t += w
                        wc[w] -= 2
                        break
            t = t + t[::-1]

        if len(t) < pl:
            return []
        ans.append(t)

    return ans

S = "".join(sorted(list(S)))
WC = collections.Counter(S)

for parts in range(1, N+1):
    if N % parts == 0:
        wc = {k: v for k, v in WC.items()}
        ans = split(wc, N//parts, parts)
        if ans:
            print(parts)
            print(" ".join(ans))
            exit(0)


# -*- coding: utf-8 -*-

import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys

"""
created by shhuan at 2017/10/22 18:15

"""

N = int(input())
S = input()

def dfs(s, wc, l):
    if l % 2 == 0:
        if any([v % 2 !=0 for v in wc.values()]):
            return []
        ans = []
        for i in range(0, len(s), l):
            t = s[i: i+l][::2]
            t += t[::-1]
            ans.append(t)
        return ans
    else:
        ans = []
        mid = ""
        for w, c in wc.items():
            if c % 2 == 1:
                mid = w
                break
        if mid:
            if wc[mid] >= l:
                wc[mid] -= l
                ans.append(mid*l)
                ans.extend(dfs(s, wc, l))
                return ans
            else:
                c = wc[mid]
                del wc[mid]
                u = mid*c
                rem = ""
                need = l-c
                for w, c in wc.items():
                    if c >= need:
                        wc[w] -= need
                        rem += w * (need // 2)
                        need = 0
                    else:
                        del wc[w]
                        need -= c
                        rem += w*(c//2)
                u = rem+u+rem
                ans.append(u)
                ans.extend(dfs(s, wc, l))
                return ans
        else:
            return []

S = "".join(sorted(list(S)))
WC = collections.Counter(S)

for parts in range(1, N+1):
    if N % parts == 0:
        wc = {k: v for k, v in WC.items()}
        ans = dfs(S, wc, N//parts)
        if ans:
            print(parts)
            print(" ".join(ans))
            exit(0)


# -*- coding: utf-8 -*-

import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys

"""
created by shhuan at 2017/10/22 18:15

"""

N = int(input())
S = input()

def dfs(s, wc, l):
    if l % 2 == 0:
        if any([v % 2 !=0 for v in wc.values()]):
            return []
        ans = []
        for i in range(0, len(s), l):
            ans.append(s[i:i+l])
        return ans
    else:
        ans = []
        mid = ""
        for w, c in wc.items():
            if c % 2 == 1:
                mid = w
                break
        if mid:
            if wc[mid] >= l:
                wc[mid] -= l
                ans.append(mid*l)
                ans.extend(dfs(s, wc, l))
                return ans
            else:
                c = wc[mid]
                del wc[mid]
                u = mid*c
                rem = ""
                need = l-c
                for w, c in wc.items():
                    if c >= need:
                        wc[w] -= need
                        rem += w * (need // 2)
                        need = 0
                    else:
                        del wc[w]
                        need -= c
                        rem += w*(c//2)
                u = rem+u+rem
                ans.append(u)
                ans.extend(dfs(s, wc, l))
                return ans
        else:
            return []

S = "".join(sorted(list(S)))
WC = collections.Counter(S)

for parts in range(1, N+1):
    if N % parts == 0:
        wc = {k: v for k, v in WC.items()}
        ans = dfs(S, wc, N//parts)
        if ans:
            print(parts)
            print(" ".join(ans))
            exit(0)


# -*- coding: utf-8 -*-

import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys

"""
created by shhuan at 2017/10/22 18:15

"""

N = int(input())
S = input()

def dfs(s, wc, l):
    if l % 2 == 0:
        if any([v % 2 !=0 for v in wc.values()]):
            return []
        ans = []
        for i in range(0, len(s), l):
            ans.append(s[i:i+l])
        return ans
    else:
        ans = []
        mid = ""
        for w, c in wc.items():
            if c % 2 == 1:
                mid = w
                break
        if mid:
            if wc[mid] >= l:
                wc[mid] -= l
                ans.append(mid*l)
                ans.extend(dfs(s, wc, l))
                return ans
            else:
                c = wc[mid]
                del wc[mid]
                u = mid*c
                rem = ""
                need = l-c
                for w, c in wc.items():
                    if c >= need:
                        wc[w] -= need
                        rem += w * (need // 2)
                        need = 0
                    else:
                        del wc[w]
                        need -= c
                        rem += w*(c//2)
                u = rem+u+rem
                ans.append(u)
                ans.extend(dfs(s, wc, l))
                return ans
        else:
            return []

S = "".join(sorted(list(S)))
WC = collections.Counter(S)

for parts in range(1, N+1):
    if N % parts == 0:
        wc = {k: v for k, v in WC.items()}
        ans = dfs(S, wc, N//parts)
        if ans:
            print(" ".join(ans))
            exit(0)


# -*- coding: utf-8 -*-

import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys

"""
created by shhuan at 2017/10/22 18:15

"""

N = int(input())
S = input()

def dfs(s, wc, l):
    if sum(wc.values()) < l:
        return []
    if l % 2 == 0:
        if any([v % 2 !=0 for v in wc.values()]):
            return []
        ans = []
        for i in range(0, len(s), l):
            t = s[i: i+l][::2]
            t += t[::-1]
            ans.append(t)
        return ans
    else:
        ans = []
        mid = ""
        for w, c in wc.items():
            if c % 2 == 1:
                mid = w
                break
        if mid:
            if wc[mid] >= l:
                wc[mid] -= l
                ans.append(mid*l)
                ans.extend(dfs(s, wc, l))
                return ans
            else:
                c = wc[mid]
                del wc[mid]
                u = mid*c
                rem = ""
                need = l-c
                for w, c in [(w, c) for w,c in wc.items()]:
                    if c >= need:
                        wc[w] -= need
                        rem += w * (need // 2)
                        need = 0
                    else:
                        del wc[w]
                        need -= c
                        rem += w*(c//2)
                u = rem+u+rem
                ans.append(u)
                ans.extend(dfs(s, wc, l))
                return ans
        else:
            ans = []
            u = ""
            need = l
            for w, c in [(w, c) for w,c in wc.items()]:
                if c >= need:
                    u += w*need
                    wc[w] -= need
                    break
                else:
                    del wc[w]
                    u += w*c
            u = u[::2] + u[::-1][1::2]
            ans.append(u)
            ans.extend(dfs(s, wc, l))
            return ans

S = "".join(sorted(list(S)))
WC = collections.Counter(S)

for parts in range(1, N+1):
    if N % parts == 0:
        wc = {k: v for k, v in WC.items()}
        ans = dfs(S, wc, N//parts)
        if ans:
            print(parts)
            print(" ".join(ans))
            exit(0)


# -*- coding: utf-8 -*-

import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys

"""
created by shhuan at 2017/10/22 18:15

"""

N = int(input())
S = input()

def split(s, wc, pl, n):

    ans = []

    if pl % 2 == 0:
        if any([x % 2 == 1 for x in wc.values()]):
            return []
        for i in range(0, len(s), pl):
            t = s[i:i + pl]
            ans.append(t[::2] + t[::-1][::2])

        return ans

    mid = [w for w, c in wc.items() if c % 2 == 1]

    if len(mid) > n:
        return []

    midindex = 0
    while len(ans) < n:
        t = ''
        u = mid[midindex] if midindex < len(mid) else ''
        midindex += 1
        if not u:
            u = list([w for w, c in wc.items() if c > 0])[0]
        wc[u] -= 1

        need = pl-1
        while need > 0:
            pneed = need
            for w, c in [(w, c) for w, c in wc.items()]:
                if c > need:
                    t += str(w) * (need//2)
                    wc[w] -= need
                    need = 0
                    break
                elif c > 1:
                    c //= 2
                    t += str(w) * c
                    wc[w] -= c * 2
                    need -= c*2
            if need == pneed:
                return []
        t = t + u + t[::-1]
        if len(t) < pl:
            return []
        ans.append(t)

    return ans

S = "".join(sorted(list(S)))
WC = collections.Counter(S)

for parts in range(1, N+1):
    if N % parts == 0:
        wc = {k: v for k, v in WC.items()}
        ans = split(S, wc, N//parts, parts)
        if ans:
            print(parts)
            print(" ".join(ans))
            exit(0)


n = int(input())
s = input()
let = list(set(list(s)))
m = len(let)
cnt = []
for c in let:
  cn = [0]
  for sc in s:
    cn.append(cn[-1] + (sc == c))
  cnt.append(cn)

def check(i, j):
  c = 0
  for p in range(m):
    c += (cnt[p][j + 1] - cnt[p][i]) % 2 == 1
  return c < 2

def create(i, j):
  c = []
  mid = None
  for p in range(m):
    h = cnt[p][j + 1] - cnt[p][i]
    if h and h % 2 == 0:
      c.append((let[p], h))
    if h % 2:
      mid = let[p], h
  res = []
  for l, h in c:
    res.extend([l]*(h//2))
  if mid:
    res.extend([mid[0]]*mid[1])
  for l, h in reversed(c):
    res.extend([l]*(h//2))
  return ''.join(res)

for c in range(1, n + 1):
  if n % c == 0:
    ch = True
    l = n // c
    for p in range(c):
      ch = ch and check(p * l, (p + 1) * l - 1)
    if ch:
      res = []
      for p in range(c):
        res.append(create(p * l, (p + 1) * l - 1))
      print(' '.join(res))
      break


from collections import Counter
n = int(input())
cnt = Counter(input())
odd = []
even = []
for s, c in cnt.items():
  if c % 2 == 1:
    odd.append([s, c])
  else:
    even.append([s, c])
k = max(1, len(odd))
for i in range(k, n + 1):
  h = n // i
  if i * h == n and (not odd or h % 2):
    k = i
    break
h = n // k
res = []
while len(res) < k:
  if odd:
    s, c = odd.pop()
    res.append(s)
    c -= 1
    if c:
      even.append([s, c])
  elif h % 2:
    res.append(even[0][0])
    res.append(even[0][0])
    even[0][1] -= 2
    if not even[0][1]:
      even.pop(0)
  else:
    res.append('')
for i in range(k):
  s = res[i]
  while len(s) < h:
    t = (h - len(s)) // 2
    a, c = even[0]
    if c <= t:
      c //= 2
      s = a*c + s + a*c
      even.pop(0)
    else:
      s = a*t + s + a*t
      even[0][1] -= 2 * t
  res[i] = s

print(len(res))
print(' '.join(res))


from collections import Counter
n = int(input())
cnt = Counter(input())
odd = []
even = []
for s, c in cnt.items():
  if c % 2 == 1:
    odd.append([s, c])
  else:
    even.append([s, c])
k = max(1, len(odd))
for i in range(k, n + 1):
  h = n // i
  if i * h == n and (not odd and h % 2 == 0 or odd and h % 2 == 1):
    k = i
    break
h = n // k
res = []
while len(res) < k:
  if odd:
    s, c = odd.pop()
    res.append(s)
    c -= 1
    if c:
      even.append([s, c])
  elif h % 2:
    res.append(even[0][0])
    res.append(even[0][0])
    even[0][1] -= 2
    if not even[0][1]:
      even.pop(0)
  else:
    res.append('')
for i in range(k):
  s = res[i]
  while len(s) < h:
    t = (h - len(s)) // 2
    a, c = even[0]
    if c <= 2 * t:
      c //= 2
      s = a*c + s + a*c
      even.pop(0)
    else:
      s = a*t + s + a*t
      even[0][1] -= 2 * t
  res[i] = s

print(len(res))
print(' '.join(res))


from collections import Counter
n = int(input())
cnt = Counter(input())
odd = []
even = []
for s, c in cnt.items():
  if c % 2 == 1:
    odd.append([s, c])
  else:
    even.append([s, c])
k = max(1, len(odd))
for i in range(k, n + 1):
  h = n // i
  if i * h == n and (not odd or h % 2):
    k = i
    break
h = n // k
res = []
while len(res) < k:
  if odd:
    res.append(odd[0][0])
    odd[0][1] -= 1
    if not odd[0][1]:
      odd.pop(0)
  elif h % 2:
    res.append(even[0][0])
    res.append(even[0][0])
    even[0][1] -= 2
    if not even[0][1]:
      even.pop(0)
  else:
    res.append('')
for i in range(k):
  s = res[i]
  while len(s) < h:
    t = (h - len(s)) // 2
    a, c = even[0]
    if c <= t:
      c //= 2
      s = a*c + s + a*c
      even.pop(0)
    else:
      s = a*t + s + a*t
      even[0][1] -= 2 * t
  res[i] = s

print(len(res))
print(' '.join(res))


from collections import Counter
n = int(input())
cnt = Counter(input())
odd = []
even = []
for s, c in cnt.items():
  if c % 2 == 1:
    odd.append([s, c])
  else:
    even.append([s, c])
k = max(1, len(odd))
for i in range(k, n + 1):
  h = n // i
  if i * h == n and (not odd or h % 2):
    k = i
    break
h = n // k
res = []
while len(res) < k:
  if odd:
    res.append(odd[0][0])
    odd[0][1] -= 1
    if not odd[0][1]:
      odd.pop(0)
    else:
      even.append(odd.pop(0))
  elif h % 2:
    res.append(even[0][0])
    res.append(even[0][0])
    even[0][1] -= 2
    if not even[0][1]:
      even.pop(0)
  else:
    res.append('')
for i in range(k):
  s = res[i]
  while len(s) < h:
    t = (h - len(s)) // 2
    a, c = even[0]
    if c <= t:
      c //= 2
      s = a*c + s + a*c
      even.pop(0)
    else:
      s = a*t + s + a*t
      even[0][1] -= 2 * t
  res[i] = s

print(len(res))
print(' '.join(res))


n = int(input())
s = input()
let = list(set(list(s)))
m = len(let)
cnt = []
for c in let:
  cn = [0]
  for sc in s:
    cn.append(cn[-1] + (sc == c))
  cnt.append(cn)

def check(i, j):
  c = 0
  for p in range(m):
    c += (cnt[p][j + 1] - cnt[p][i]) % 2 == 1
  return c < 2

def create(i, j):
  c = []
  mid = None
  for p in range(m):
    h = cnt[p][j + 1] - cnt[p][i]
    if h and h % 2 == 0:
      c.append((let[p], h))
    if h % 2:
      mid = let[p], h
  res = []
  for l, h in c:
    res.extend([l]*(h//2))
  if mid:
    res.extend([mid[0]]*mid[1])
  for l, h in reversed(c):
    res.extend([l]*(h//2))
  return ''.join(res)

for c in range(1, n + 1):
  if n % c == 0:
    ch = True
    l = n // c
    for p in range(c):
      ch = ch and check(p * l, (p + 1) * l - 1)
    if ch:
      res = []
      for p in range(c):
        res.append(create(p * l, (p + 1) * l - 1))
      print(len(res))
      print(' '.join(res))
      break


from sys import stdin
n = int(stdin.readline())
def prr(x):
 cnt = {}
 for i in x:
  cnt[i] = cnt.get(i,0) +  1
 fir = []
 sec = []
 mid = ''
 for i in cnt:
  fir += [i] * (cnt[i]/2)
  sec += [i] * (cnt[i]/2)
  if cnt[i]%2:
   mid  = i
 sec.reverse()
 print ''.join(fir) + mid + ''.join(sec),
di = {}
fi = {}
s = stdin.readline().strip()
for i in s:
 di[i] = di.get(i,0) + 1
odd = []
for i in di:
 if di[i]%2:
  odd.append(i)
  di[i]-=1
 if di[i]:
  fi[i] = di[i]
ods = len(odd)
for ll in xrange(1,n+1):
 if n%ll:
  continue
 my = n/ll
 # we have to divide in of length my in total ll values
 ma = 0
 if my %2:
  ma = ll
 if ma < ods:
  continue
 break
ind = 0
ans = []
keys = fi.keys()
print ll
if my%2:
 for i in odd:
  ans.append([i])
 while len(ans) < ll:
  ans.append(keys[ind])
  fi[keys[ind]]-=1
  if fi[keys[ind]]==0:
   ind+=1
else:
 prr(list(s))
 exit(0)
for x in ans:
 try:
  while len(x)< my:
   x.append(keys[ind])
   x.append(keys[ind])
   fi[keys[ind]]-=2
   if fi[keys[ind]]<=0:
    ind += 1
  try:
   prr(x)
  except Exception:
   while True:
    mm = 3
 except Exception:
  print "kya pata"


from sys import stdin
n = int(stdin.readline())
def prr(x):
 cnt = {}
 for i in x:
  cnt[i] = cnt.get(i,0) +  1
 fir = []
 sec = []
 mid = ''
 for i in cnt:
  if cnt[i]>1:
   fir += [i] * (cnt[i]/2)
   sec += [i] * (cnt[i]/2)
  if cnt[i]%2:
   mid  = i
 sec.reverse()
 print ''.join(fir) + mid + ''.join(sec),
di = {}
fi = {}
s = stdin.readline().strip()
for i in s:
 di[i] = di.get(i,0) + 1
odd = []
for i in di:
 if di[i]%2:
  odd.append(i)
  di[i]-=1
 if di[i]:
  fi[i] = di[i]
ods = len(odd)
for ll in xrange(1,n+1):
 if n%ll:
  continue
 my = n/ll
 # we have to divide in of length my in total ll values
 ma = 0
 if my %2:
  ma = ll
 if ma < ods:
  continue
 break
ind = 0
ans = []
keys = fi.keys()
print ll
if my%2:
 for i in xrange(ll):
  ans.append([])
 for i in xrange(ods):
  ans[i].append(odd[i])
else:
 prr(list(s))
 exit(0)
remain = []
for i in fi:
 remain += [i] * fi[i]
ind = 0
for x in ans:
 while len(x)< my:
  x.append(remain[ind])
  ind+=1
 try:
  prr(x)
 except Exception:
  print "nahi ye ho nahi sakta yahaan par code fat jaaye "


from sys import stdin
n = int(stdin.readline())
def prr(x):
 cnt = {}
 for i in x:
  cnt[i] = cnt.get(i,0) +  1
 fir = []
 sec = []
 mid = ''
 for i in cnt:
  if cnt[i]>1:
   fir += [i] * (cnt[i]/2)
   sec += [i] * (cnt[i]/2)
  if cnt[i]%2:
   mid  = i
 sec.reverse()
 print ''.join(fir) + mid + ''.join(sec),
di = {}
fi = {}
s = stdin.readline().strip()
for i in s:
 di[i] = di.get(i,0) + 1
odd = []
for i in di:
 if di[i]%2:
  odd.append(i)
  di[i]-=1
 if di[i]:
  fi[i] = di[i]
ods = len(odd)
for ll in xrange(1,n+1):
 if n%ll:
  continue
 my = n/ll
 # we have to divide in of length my in total ll values
 ma = 0
 if my %2:
  ma = ll
 if ma < ods:
  continue
 break
ind = 0
ans = []
keys = fi.keys()
print ll
if my%2:
 for i in xrange(ll):
  ans.append([])
 for i in xrange(ods):
  ans[i].append(odd[i])
else:
 prr(list(s))
 exit(0)

for x in ans:
 while len(x)< my:
  if ind >= len(keys):
   print "kya bakar hai yaar"
  x.append(keys[ind])
  x.append(keys[ind])
  fi[keys[ind]]-=2
  if fi[keys[ind]]<=0:
   ind += 1
 try:
  prr(x)
 except Exception:
  print "nahi ye ho nahi sakta yahaan par code fat jaaye "


from sys import stdin
n = int(stdin.readline())
def prr(x):
 cnt = {}
 for i in x:
  cnt[i] = cnt.get(i,0) +  1
 fir = []
 sec = []
 mid = ''
 for i in cnt:
  fir += [i] * (cnt[i]/2)
  sec += [i] * (cnt[i]/2)
  if cnt[i]%2:
   mid  = i
 sec.reverse()
 print ''.join(fir) + mid + ''.join(sec),
di = {}
fi = {}
s = stdin.readline().strip()
for i in s:
 di[i] = di.get(i,0) + 1
odd = []
for i in di:
 if di[i]%2:
  odd.append(i)
  di[i]-=1
 if di[i]:
  fi[i] = di[i]
ods = len(odd)
for ll in xrange(1,n+1):
 if n%ll:
  continue
 my = n/ll
 # we have to divide in of length my in total ll values
 ma = 0
 if my %2:
  ma = ll
 if ma < ods:
  continue
 break
ind = 0
ans = []
keys = fi.keys()
print ll
if my%2:
 for i in xrange(ll):
  ans.append([])
 for i in xrange(ods):
  ans[i].append(odd[i])
else:
 prr(list(s))
 exit(0)
for x in ans:
 while len(x)< my:
  x.append(keys[ind])
  x.append(keys[ind])
  fi[keys[ind]]-=2
  if fi[keys[ind]]<=0:
   ind += 1
  prr(x)


from sys import stdin
n = int(stdin.readline())
def prr(x):
 cnt = {}
 for i in x:
  cnt[i] = cnt.get(i,0) +  1
 fir = []
 sec = []
 mid = ''
 for i in cnt:
  fir += [i] * (cnt[i]/2)
  sec += [i] * (cnt[i]/2)
  if cnt[i]%2:
   mid  = i
 sec.reverse()
 print ''.join(fir) + mid + ''.join(sec),
di = {}
fi = {}
s = stdin.readline().strip()
for i in s:
 di[i] = di.get(i,0) + 1
odd = []
for i in di:
 if di[i]%2:
  odd.append(i)
  di[i]-=1
 if di[i]:
  fi[i] = di[i]
ods = len(odd)
for ll in xrange(1,n+1):
 if n%ll:
  continue
 my = n/ll
 # we have to divide in of length my in total ll values
 ma = 0
 if my %2:
  ma = ll
 if ma < ods:
  continue
 break
ind = 0
ans = []
keys = fi.keys()
print ll
if my%2:
 for i in odd:
  ans.append([i])
 while len(ans) < ll:
  ans.append(keys[ind])
  fi[keys[ind]]-=1
  if fi[keys[ind]]==0:
   ind+=1
else:
 prr(list(s))
 exit(0)
for x in ans:
 try:
  while len(x)< my:
   x.append(keys[ind])
   x.append(keys[ind])
   fi[keys[ind]]-=2
   if fi[keys[ind]]==0:
    ind += 1
  prr(x)
 except Exception:
  print "kya pata"


from sys import stdin
n = int(stdin.readline())
def prr(x):
 cnt = {}
 for i in x:
  cnt[i] = cnt.get(i,0) +  1
 fir = []
 sec = []
 mid = ''
 for i in cnt:
  if cnt[i]>1:
   fir += [i] * (cnt[i]/2)
   sec += [i] * (cnt[i]/2)
  if cnt[i]%2:
   mid  = i
 sec.reverse()
 print ''.join(fir) + mid + ''.join(sec),
di = {}
fi = {}
s = stdin.readline().strip()
for i in s:
 di[i] = di.get(i,0) + 1
odd = []
for i in di:
 if di[i]%2:
  odd.append(i)
  di[i]-=1
 if di[i]:
  fi[i] = di[i]
ods = len(odd)
for ll in xrange(1,n+1):
 if n%ll:
  continue
 my = n/ll
 # we have to divide in of length my in total ll values
 ma = 0
 if my %2:
  ma = ll
 if ma < ods:
  continue
 break
ind = 0
ans = []
keys = fi.keys()
print ll
if my%2:
 for i in xrange(ll):
  ans.append([])
 for i in xrange(ods):
  ans[i].append(odd[i])
else:
 prr(list(s))
 exit(0)

for x in ans:
 while len(x)< my:
  if ind > len(keys):
   print "kya bakar hai yaar"
  x.append(keys[ind])
  x.append(keys[ind])
  fi[keys[ind]]-=2
  if fi[keys[ind]]<=0:
   ind += 1
 try:
  prr(x)
 except Exception:
  print "nahi ye ho nahi sakta yahaan par code fat jaaye "


from sys import stdin
n = int(stdin.readline())
def prr(x):
 cnt = {}
 for i in x:
  cnt[i] = cnt.get(i,0) +  1
 fir = []
 sec = []
 mid = ''
 for i in cnt:
  fir += [i] * (cnt[i]/2)
  sec += [i] * (cnt[i]/2)
  if cnt[i]%2:
   mid  = i
 sec.reverse()
 print ''.join(fir) + mid + ''.join(sec),
di = {}
fi = {}
s = stdin.readline().strip()
for i in s:
 di[i] = di.get(i,0) + 1
odd = []
for i in di:
 if di[i]%2:
  odd.append(i)
  di[i]-=1
 if di[i]:
  fi[i] = di[i]
ods = len(odd)
for ll in xrange(1,n+1):
 if n%ll:
  continue
 my = n/ll
 # we have to divide in of length my in total ll values
 ma = 0
 if my %2:
  ma = ll
 if ma < ods:
  continue
 break
ind = 0
ans = []
keys = fi.keys()
print ll
if my%2:
 for i in odd:
  ans.append([i])

 while len(ans) < ll:
  ans.append(keys[ind])
  fi[keys[ind]]-=1
  if fi[keys[ind]]==0:
   ind+=1
else:
 prr(list(s))
 exit(0)
for x in ans:
 while len(x)< my:
  x.append(keys[ind])
  x.append(keys[ind])
  fi[keys[ind]]-=2
  if fi[keys[ind]]==0:
   ind += 1
 prr(x)


from sys import stdin
n = int(stdin.readline())
def prr(x):
 cnt = {}
 for i in x:
  cnt[i] = cnt.get(i,0) +  1
 fir = []
 sec = []
 mid = ''
 for i in cnt:
  if cnt[i]>1:
   fir += [i] * (cnt[i]/2)
   sec += [i] * (cnt[i]/2)
  if cnt[i]%2:
   mid  = i
 sec.reverse()
 print ''.join(fir) + mid + ''.join(sec),
di = {}
fi = {}
s = stdin.readline().strip()
for i in s:
 di[i] = di.get(i,0) + 1
odd = []
for i in di:
 if di[i]%2:
  odd.append(i)
  di[i]-=1
 if di[i]:
  fi[i] = di[i]
ods = len(odd)
for ll in xrange(1,n+1):
 if n%ll:
  continue
 my = n/ll
 # we have to divide in of length my in total ll values
 ma = 0
 if my %2:
  ma = ll
 if ma < ods:
  continue
 break
ind = 0
ans = []
keys = fi.keys()
print ll
if my%2:
 for i in xrange(ll):
  ans.append([])
 for i in xrange(ods):
  ans[i].append(odd[i])
else:
 prr(list(s))
 exit(0)

for x in ans:
 while len(x)< my:
  if ind > len(keys):
   print "kya bakar hai yaar"
   break
  x.append(keys[ind])
  x.append(keys[ind])
  fi[keys[ind]]-=2
  if fi[keys[ind]]<=0:
   ind += 1

 prr(x)


from sys import stdin
n = int(stdin.readline())
def prr(x):
 cnt = {}
 for i in x:
  cnt[i] = cnt.get(i,0) +  1
 fir = []
 sec = []
 mid = ''
 for i in cnt:
  fir += [i] * (cnt[i]/2)
  sec += [i] * (cnt[i]/2)
  if cnt[i]%2:
   mid  = i
 sec.reverse()
 print ''.join(fir) + mid + ''.join(sec),
di = {}
fi = {}
s = stdin.readline().strip()
for i in s:
 di[i] = di.get(i,0) + 1
odd = []
for i in di:
 if di[i]%2:
  odd.append(i)
  di[i]-=1
 if di[i]:
  fi[i] = di[i]
ods = len(odd)
for ll in xrange(1,n+1):
 if n%ll:
  continue
 my = n/ll
 # we have to divide in of length my in total ll values
 ma = 0
 if my %2:
  ma = ll
 if ma < ods:
  continue
 break
ind = 0
ans = []
keys = fi.keys()
print ll
if my%2:
 for i in xrange(ll):
  ans.append([])
 for i in xrange(ods):
  ans[i].append(odd[i])
else:
 prr(list(s))
 exit(0)
for x in ans:
 try:
  while len(x)< my:
   x.append(keys[ind])
   x.append(keys[ind])
   fi[keys[ind]]-=2
   if fi[keys[ind]]<=0:
    ind += 1
  prr(x)
 except Exception:
  print "kya pata"


from sys import stdin
n = int(stdin.readline())
def prr(x):
 cnt = {}
 for i in x:
  cnt[i] = cnt.get(i,0) +  1
 fir = []
 sec = []
 mid = ''
 for i in cnt:
  fir += [i] * (cnt[i]/2)
  sec += [i] * (cnt[i]/2)
  if cnt[i]%2:
   mid  = i
 sec.reverse()
 print ''.join(fir) + mid + ''.join(sec),
di = {}
fi = {}
s = stdin.readline().strip()
for i in s:
 di[i] = di.get(i,0) + 1
odd = []
for i in di:
 if di[i]%2:
  odd.append(i)
  di[i]-=1
 if di[i]:
  fi[i] = di[i]
ods = len(odd)
for ll in xrange(1,n+1):
 if n%ll:
  continue
 my = n/ll
 # we have to divide in of length my in total ll values
 ma = 0
 if my %2:
  ma = ll
 if ma < ods:
  continue
 break
ind = 0
ans = []
keys = fi.keys()
print ll
if my%2:
 for i in odd:
  ans.append([i])
 while len(ans) < ll:
  ans.append(keys[ind])
  fi[keys[ind]]-=1
  if fi[keys[ind]]==0:
   ind+=1
else:
 prr(list(s))
 exit(0)
for x in ans:
 try:
  while len(x)< my:
   x.append(keys[ind])
   x.append(keys[ind])
   fi[keys[ind]]-=2
   if fi[keys[ind]]==0:
    ind += 1
  try:
   prr(x)
  except Exception:
   while True:
    mm = 3
 except Exception:
  print "kya pata"


from sys import stdin
n = int(stdin.readline())
def prr(x):
 cnt = {}
 for i in x:
  cnt[i] = cnt.get(i,0) +  1
 fir = []
 sec = []
 mid = ''
 for i in cnt:
  fir += [i] * (cnt[i]/2)
  sec += [i] * (cnt[i]/2)
  if cnt[i]%2:
   mid  = i
 sec.reverse()
 print ''.join(fir) + mid + ''.join(sec),
di = {}
fi = {}
s = stdin.readline().strip()
for i in s:
 di[i] = di.get(i,0) + 1
odd = []
for i in di:
 if di[i]%2:
  odd.append(i)
  di[i]-=1
 if di[i]:
  fi[i] = di[i]
ods = len(odd)
for ll in xrange(1,n+1):
 if n%ll:
  continue
 my = n/ll
 # we have to divide in of length my in total ll values
 ma = 0
 if my %2:
  ma = ll
 if ma < ods:
  continue
 break
ind = 0
ans = []
keys = fi.keys()
print ll
if my%2:
 for i in odd:
  ans.append([i])

 while len(ans) < ll:
  ans.append(keys[ind])
  fi[keys[ind]]-=1
  if fi[keys[ind]]==0:
   ind+=1
else:
 ans.append([])
for x in ans:
 while len(x)< my:
  x.append(keys[ind])
  x.append(keys[ind])
  fi[keys[ind]]-=2
  if fi[keys[ind]]==0:
   ind += 1
 prr(x)


from sys import stdin
n = int(stdin.readline())
def prr(x):
 cnt = {}
 for i in x:
  cnt[i] = cnt.get(i,0) +  1
 fir = []
 sec = []
 mid = ''
 for i in cnt:
  fir += [i] * (cnt[i]/2)
  sec += [i] * (cnt[i]/2)
  if cnt[i]%2:
   mid  = i
 sec.reverse()
 print ''.join(fir) + mid + ''.join(sec),
di = {}
fi = {}
s = stdin.readline().strip()
for i in s:
 di[i] = di.get(i,0) + 1
odd = []
for i in di:
 if di[i]%2:
  odd.append(i)
  di[i]-=1
 if di[i]:
  fi[i] = di[i]
ods = len(odd)
for ll in xrange(1,n+1):
 if n%ll:
  continue
 my = n/ll
 # we have to divide in of length my in total ll values
 ma = 0
 if my %2:
  ma = ll
 if ma < ods:
  continue
 break
ind = 0
ans = []
keys = fi.keys()
print ll
if my%2:
 for i in xrange(ll):
  ans.append([])
 for i in xrange(ods):
  ans[i].append(odd[i])
else:
 prr(list(s))
 exit(0)

for x in ans:
 while len(x)< my:
  x.append(keys[ind])
  x.append(keys[ind])
  fi[keys[ind]]-=2
  if fi[keys[ind]]<=0:
   ind += 1
 prr(x)


from fractions import Fraction

letters = {}

n = int(raw_input().rstrip())
string = raw_input()

for char in string:
	if letters.get(char, -1) == -1:
		letters[char] = 0
	letters[char] += 1

odd = []
even = {}

for char, num in letters.iteritems():
	if num % 2 != 0:
		odd.append(char)
		if num != 1:
			even[char] = (num - 1)
	else:
		even[char] = num

odd_sum = len(odd)
even_sum = sum(even.values())

splits = n
if odd_sum != 0 and even_sum != 0:
	if even_sum % odd_sum == 0:
		 splits = even_sum / odd_sum
elif odd_sum == 0:
	splits = 1

per_split = n / splits

for i in range(odd_sum):
	string = odd[i]
	temp_collected = 0
	temp_str = ""
	needed = (per_split - 1) / 2
	for char, num in even.iteritems():
		if temp_collected == needed:
			break
		if num != 0:
			if num - ((needed - temp_collected) * 2) < 0:
				temp_collected += (num/2)
				temp_str += (char * (num/2))
				even[char] = 0
			else:
				temp_str += (char * (needed - temp_collected))
				even[char] = (num - ((needed - temp_collected) * 2))
				temp_collected = needed
	print temp_str + string + temp_str[::-1],

for i in range(splits - odd_sum):
		temp_collected = 0
		temp_str = ""
		needed = per_split / 2
		for char, num in even.iteritems():
			if temp_collected == needed:
				break
			if num != 0:
				if num - ((needed - temp_collected) * 2) < 0:
					temp_collected += (num/2)
					temp_str += (char * (num/2))
					even[char] = 0
				else:
					temp_str += (char * (needed - temp_collected))
					even[char] = (num - ((needed - temp_collected) * 2))
					temp_collected = needed
		print temp_str + temp_str[::-1],


from fractions import Fraction

letters = {}

n = int(raw_input())
string = raw_input()

for char in string:
	if letters.get(char, -1) == -1:
		letters[char] = 0
	letters[char] += 1

odd = []
even = {}

for char, num in letters.iteritems():
	if num % 2 != 0:
		odd.append(char)
		if num != 1:
			even[char] = (num - 1)
	else:
		even[char] = num

odd_sum = len(odd)
even_sum = sum(even.values())

splits = n
if odd_sum != 0 and even_sum != 0:
	if (float(even_sum) / odd_sum) == float(even_sum / odd_sum) and (even_sum / odd_sum) % 2 == 0:
		splits = odd_sum
	else:
		splits = n
elif odd_sum == 0:
	splits = 1

change = 0

while odd_sum < even_sum and splits == n:
	odd_sum += 2
	even_sum -= 2
	change += 2
	splits = n
	if odd_sum != 0 and even_sum != 0:
		if (float(even_sum) / odd_sum) == float(even_sum / odd_sum) and (even_sum / odd_sum) % 2 == 0:
			splits = odd_sum
		else:
			splits = n
	elif odd_sum == 0:
		splits = 1

temp_collected = 0
temp_str = ""
for char, value in even.iteritems():
		if temp_collected == change:
			break
		if value - (change - temp_collected) < 0:
			temp_collected += value
			temp_str += (char * value)
			even[char] = 0
		else:
			temp_str += (char * (change - temp_collected))
			even[char] = (value - (change - temp_collected))
			temp_collected = change
for char in temp_str:
	odd.append(char)

print(splits)
per_split = n / splits

if splits == n:
	for i in string:
		print i,

else:
	for i in range(odd_sum):
		string = odd[i]
		temp_collected = 0
		temp_str = ""
		needed = (per_split - 1) / 2
		for char, num in even.iteritems():
			if temp_collected == needed:
				break
			if num != 0:
				if num - ((needed - temp_collected) * 2) < 0:
					temp_collected += (num/2)
					temp_str += (char * (num/2))
					even[char] = 0
				else:
					temp_str += (char * (needed - temp_collected))
					even[char] = (num - ((needed - temp_collected) * 2))
					temp_collected = needed
		print temp_str + string + temp_str[::-1],

	for i in range(splits - odd_sum):
			temp_collected = 0
			temp_str = ""
			needed = per_split / 2
			for char, num in even.iteritems():
				if temp_collected == needed:
					break
				if num != 0:
					if num - ((needed - temp_collected) * 2) < 0:
						temp_collected += (num/2)
						temp_str += (char * (num/2))
						even[char] = 0
					else:
						temp_str += (char * (needed - temp_collected))
						even[char] = (num - ((needed - temp_collected) * 2))
						temp_collected = needed
			print temp_str + temp_str[::-1],


from fractions import Fraction

letters = {}

n = int(raw_input().rstrip())
string = raw_input()

for char in string:
	if letters.get(char, -1) == -1:
		letters[char] = 0
	letters[char] += 1

odd = []
even = {}

for char, num in letters.iteritems():
	if num % 2 != 0:
		odd.append(char)
		if num != 1:
			even[char] = (num - 1)
	else:
		even[char] = num

odd_sum = len(odd)
even_sum = sum(even.values())

splits = n
if odd_sum != 0 and even_sum != 0:
	if even_sum % odd_sum == 0:
		 splits = even_sum / odd_sum
elif odd_sum == 0:
	splits = 1

print(splits)
per_split = n / splits

for i in range(odd_sum):
	string = odd[i]
	temp_collected = 0
	temp_str = ""
	needed = (per_split - 1) / 2
	for char, num in even.iteritems():
		if temp_collected == needed:
			break
		if num != 0:
			if num - ((needed - temp_collected) * 2) < 0:
				temp_collected += (num/2)
				temp_str += (char * (num/2))
				even[char] = 0
			else:
				temp_str += (char * (needed - temp_collected))
				even[char] = (num - ((needed - temp_collected) * 2))
				temp_collected = needed
	print temp_str + string + temp_str[::-1],

for i in range(splits - odd_sum):
		temp_collected = 0
		temp_str = ""
		needed = per_split / 2
		for char, num in even.iteritems():
			if temp_collected == needed:
				break
			if num != 0:
				if num - ((needed - temp_collected) * 2) < 0:
					temp_collected += (num/2)
					temp_str += (char * (num/2))
					even[char] = 0
				else:
					temp_str += (char * (needed - temp_collected))
					even[char] = (num - ((needed - temp_collected) * 2))
					temp_collected = needed
		print temp_str + temp_str[::-1],


from fractions import Fraction

letters = {}

n = int(raw_input())
string = raw_input()

for char in string:
	if letters.get(char, -1) == -1:
		letters[char] = 0
	letters[char] += 1

odd = []
even = {}

for char, num in letters.iteritems():
	if num % 2 != 0:
		odd.append(char)
		if num != 1:
			even[char] = (num - 1)
	else:
		even[char] = num

odd_sum = len(odd)
even_sum = sum(even.values())

#print(odd_sum, even_sum)

splits = n
if odd_sum != 0 and even_sum != 0:
	if (float(even_sum) / odd_sum) == (even_sum / odd_sum) and (even_sum / odd_sum) % 2 == 0:
		splits = odd_sum
	else:
		splits = n
elif odd_sum == 0:
	splits = 1

print(splits)
per_split = n / splits

if splits == n:
	for i in string:
		print i,

else:
	for i in range(odd_sum):
		string = odd[i]
		temp_collected = 0
		temp_str = ""
		needed = (per_split - 1) / 2
		for char, num in even.iteritems():
			if temp_collected == needed:
				break
			if num != 0:
				if num - ((needed - temp_collected) * 2) < 0:
					temp_collected += (num/2)
					temp_str += (char * (num/2))
					even[char] = 0
				else:
					temp_str += (char * (needed - temp_collected))
					even[char] = (num - ((needed - temp_collected) * 2))
					temp_collected = needed
		print temp_str + string + temp_str[::-1],

	for i in range(splits - odd_sum):
			temp_collected = 0
			temp_str = ""
			needed = per_split / 2
			for char, num in even.iteritems():
				if temp_collected == needed:
					break
				if num != 0:
					if num - ((needed - temp_collected) * 2) < 0:
						temp_collected += (num/2)
						temp_str += (char * (num/2))
						even[char] = 0
					else:
						temp_str += (char * (needed - temp_collected))
						even[char] = (num - ((needed - temp_collected) * 2))
						temp_collected = needed
			print temp_str + temp_str[::-1],


import sys

def even(a):
    return a % 2 == 0

def odd(a):
    return a % 2 <> 0

def solve(s):
    counts = {}
    for c in s:
        if c not in counts: counts[c] = 0
        counts[c] += 1
    n = len(s)
    nodd = 0
    neven = 0
    for c in counts:
        if even(counts[c]):
            neven += 1
        else:
            nodd += 1
    for k in xrange(1,n+1):
        if n % k <> 0: continue
        m = n // k  # size of each part
        # print "--- n:", n, "k:", k, "m:", m
        sol = try_palindrome(counts, nodd, k, m)
        if sol:
            print len(sol)
            print ' '.join(sol)
            return

def try_palindrome(counts, nodd, k, m):
    if even(m):
        return try_even(counts, nodd, k, m)
    else:
        return try_odd(counts, nodd, k, m)

def try_even(counts, nodd, k, m):
    # assert: m even
    # print "try_even m: {}, counts: {}".format(m, counts)
    if nodd: return None
    return [ h + h[::-1] for h in even_pals(counts, m) ]

def try_odd(counts, nodd, k, m):
    # print "try_odd  m: {}, counts: {}".format(m, counts)
    # assert: m odd
    if (k < nodd) or odd(k - nodd):
        return None
    centers = []
    for c in counts:
        if odd(counts[c]):
            counts[c] -= 1
            centers.append(c)
    # print "centers: {}  counts: {} k: {}".format(centers, counts, k)
    for c in counts:
        used = max(0, min(counts[c], k - len(centers)))
        counts[c] -= used
        centers.extend([c] * used)
        if len(centers) >= k:
            break
    halfs = even_pals(counts, m-1)
    if len(halfs) == 0:
        halfs = [ '' ] * k
    return [ h + c + h[::-1] for c, h in zip(centers, halfs) ]

# create even palindromes of length m
def even_pals(counts, m):
    # assert: m even and no counts[c] is odd
    pals = []
    pal = []
    plen = 0
    for c, cm in counts.iteritems():
        while cm > 0:
            used = min(m - plen, cm)
            if used:
                # add c * take to current palindrome
                counts[c] -= used
                pal.append( (c, used) )
                plen += used
                if plen >= m:
                    pals.append(pal)
                    pal = []
                    plen = 0
            cm -= used
    # assert: plen == 0, pal == []
    return [ ''.join([ (c * (used // 2)) for c, used in pal ]) for pal in pals ]

# solve("aaaaaaaaaaaa")
# solve("aaaaaaaaaaab")
# solve("ccaaaaaaaab")
# solve("aA")
if __name__ == "__main__":
    n = int( sys.stdin.readline() )
    s = sys.stdin.readline().strip()
    solve(s)
# solve("aabaac")
# solve("0rTrT022")


import sys

def even(a):
    return a % 2 == 0

def odd(a):
    return a % 2 <> 0

def solve(s):
    counts = {}
    for c in s:
        if c not in counts: counts[c] = 0
        counts[c] += 1
    n = len(s)
    nodd = 0
    neven = 0
    for c in counts:
        if even(counts[c]):
            neven += 1
        else:
            nodd += 1
    for k in xrange(1,n+1):
        if n % k <> 0: continue
        m = n // k  # size of each part
        # print "--- n:", n, "k:", k, "m:", m
        sol = try_palindrome(counts, nodd, k, m)
        if sol:
            print len(sol)
            print ' '.join(sol)
            return

def try_palindrome(counts, nodd, k, m):
    if even(m):
        return try_even(counts, nodd, k, m)
    else:
        return try_odd(counts, nodd, k, m)

def try_even(counts, nodd, k, m):
    # assert: m even
    # print "try_even m: {}, counts: {}".format(m, counts)
    if nodd: return None
    return [ h + h[::-1] for h in even_pals(counts, m) ]

def try_odd(counts, nodd, k, m):
    # print "try_odd  m: {}, counts: {}".format(m, counts)
    # assert: m odd
    if (k < nodd) or odd(k - nodd):
        return None
    centers = []
    for c in counts:
        if odd(counts[c]):
            counts[c] -= 1
            centers.append(c)
    # print "centers: {}  counts: {} k: {}".format(centers, counts, k)
    for c in counts:
        used = max(0, min(counts[c], k - len(centers)))
        # print "c: {} used: {}".format(c, used)
        counts[c] -= used
        centers.extend([c] * used)
        if len(centers) >= k:
            break
    halfs = even_pals(counts, m-1)
    return [ h + c + h[::-1] for c, h in zip(centers, halfs) ]

# create even palindromes of length m
def even_pals(counts, m):
    # assert: m even and no counts[c] is odd
    pals = []
    pal = []
    plen = 0
    for c, cm in counts.iteritems():
        while cm > 0:
            used = min(m - plen, cm)
            if used:
                # add c * take to current palindrome
                counts[c] -= used
                pal.append( (c, used) )
                plen += used
                if plen >= m:
                    pals.append(pal)
                    pal = []
                    plen = 0
            cm -= used
    # assert: plen == 0, pal == []
    return [ ''.join([ (c * (used // 2)) for c, used in pal ]) for pal in pals ]

# solve("aaaaaaaaaaaa")
# solve("aaaaaaaaaaab")
# solve("ccaaaaaaaab")
if __name__ == "__main__":
    n = int( sys.stdin.readline() )
    s = sys.stdin.readline().strip()
    solve(s)
# solve("aabaac")
# solve("0rTrT022")


mp, al, ap = {}, [], []
n = input()
for c in raw_input():
	if c in mp:
		mp[c] += 1
	else:
		mp[c] = 1
m = 0
for x in mp:
	if mp[x] % 2:
		al.append(x)
		mp[x] -= 1
		m += 1
	if mp[x]:
		ap.append(x)
st = max(m, 1)
for i in range(st, n + 1):
	if n % i == 0:
	 	p = n / i % 2
	 	if p < (m != 0):continue
		print i
		for j in range(i - st):
			al.append(ap[-1])
			mp[ap[-1]] -= 1
			if not mp[ap[-1]]:
				ap.pop()
		for k in range(i):
			s = ''
			for j in range(p / 2):
				s += ap[-1]
				mp[ap[-1]] -=2
				if not mp[ap[-1]]:
					ap.pop()
			if m != 0:s = s + al.pop() + s[::-1]
			else:s = s + s[::-1]
			print s,
		break


mp, al, ap = {}, [], []
n = input()
for c in raw_input():
	if c in mp:
		mp[c] += 1
	else:
		mp[c] = 1
m = 0
for x in mp:
	if mp[x] % 2:
		al.append(x)
		mp[x] -= 1
		m += 1
	if mp[x]:
		ap.append(x)
st = max(m, 1)
for i in range(st, n + 1):
	if n % i == 0:
	 	p = n / i
	 	if p % 2 < (m != 0):continue
		print i
		for j in range(i - st):
			al.append(ap[-1])
			mp[ap[-1]] -= 1
			if not mp[ap[-1]]:
				ap.pop()
		for k in range(i):
			s = ''
			for j in range(p / 2):
				s += ap[-1]
				mp[ap[-1]] -=2
				if not mp[ap[-1]]:
					ap.pop()
			if m != 0:s = s + al.pop() + s[::-1]
			else:s = s + s[::-1]
			print s,
		break


from math import *
from fractions import gcd
from itertools import *
import string
import random
def id_generator(size=20, chars=string.digits):
    return ''.join(random.choice(chars) for _ in range(size))

def mp():
    return map(int,str(raw_input()).split())

n=input()
s=str(raw_input())
#n=20
#s='54334701561101776710'
#n=len(s)
#print n
#print s
d={'':0}
for i in range(n):
    try:
        if d[s[i]]:
            d[s[i]]+=1
    except:
        d[s[i]]=1
#print d
ans=0
for i in d:
    if d[i]%2==1:
        ans+=1
ans=max(ans,1)
#print ans
z=[]
for i in range(1,int(sqrt(n))+2):
    if n%i==0:
        z+=[i]
        z+=[n/i]
z=list(set(z))
#print z
z.sort()
val=ans
#print val,z
for i in z:
    if ans==1:
        break
    elif i==ans and (n/i)%2==1:
        break
    elif i>ans and (n/i)%2==1:
        val=i
        break
#print val
l=[['' for i in range(n/val)] for j in range(val)]
#print n/val,z
c=val-ans
cc=[]
for i in range(1,int(sqrt(c))+1):
    if c%i==0:
        cc+=[i]
        cc+=[c/i]
cc=list(set(cc))
cc.sort()
#print cc
cc=cc[1:]
if n/val==1:
    print n
    for i in s:
        print i,
    exit()
for i in range(val):
    j=''
    q=n/(2*val)
    qq=0
    for j in d:
        if d[j]%2==1:
            d[j]-=1
            l[i][q]=j
            qq+=1
            break
        else:
            j=''
    if j=='' and (l[i][q]=='' and (n/val)%2==1):
        if c>0:
            for j in d:
                for k in cc:
                    if d[j]%k==0 and d[j]>0:
                        if (d[j]/k)%2==1:
                            for lol in range(i,(i+k)):
                                d[j]-=1
                                #print lol
                                l[lol][q]=j
                            qq+=1
                            break
                        else:
                            j=''
                if qq:
                    break

    else:
        if l[i][q]!='':
            qq=1
    #print j,d
    #print l,qq
    while d[j]>0 and (q+qq)<(n/val):
        l[i][q-qq]=j
        l[i][q+qq]=j
        d[j]-=2
        qq+=1
    #print qq,j
    if qq==0:
        while l[i][0]=='':
            j=0
            for j in d:
                if d[j]%2==0 and d[j]>0:
                    break
            while d[j]>0 and (q+qq)<(n/val):
                #print q,qq
                l[i][q-qq-1]=j
                l[i][q+qq]=j
                d[j]-=2
                qq+=1
                #print l
    else:
        while l[i][0]=='':
            j=0
            for j in d:
                if d[j]%2==0 and d[j]>0:
                    break
            while d[j]>0 and (q+qq)<(n/val):
                #print q,qq
                l[i][q-qq]=j
                l[i][q+qq]=j
                d[j]-=2
                qq+=1
                #print l
#printing answer
#print l
print len(l)
for i  in l:
    s=''
    for j in i:
        s+=j
    print s,


from math import *
from fractions import gcd
from itertools import *
import string
import random
def id_generator(size=20, chars=string.digits):
    return ''.join(random.choice(chars) for _ in range(size))

def mp():
    return map(int,str(raw_input()).split())

n=input()
s=str(raw_input())
#n=20
#s='54334701561101776710'
#n=len(s)
#print n
#print s
d={'':0}
for i in range(n):
    try:
        if d[s[i]]:
            d[s[i]]+=1
    except:
        d[s[i]]=1
#print d
ans=0
for i in d:
    if d[i]%2==1:
        ans+=1
ans=max(ans,1)
z=[]
for i in range(1,int(sqrt(n))+2):
    if n%i==0:
        z+=[i]
        z+=[n/i]
z=list(set(z))
z.sort()
val=ans
for i in z:
    if ans==1:
        break
    elif i==ans and (n/i)%2==1:
        break
    elif i>ans and (n/i)%2==1:
        val=i
        break
l=[['' for i in range(n/val)] for j in range(val)]
j=0
if n/val==1:
    print n
    for i in s:
        print i,
    exit()

if (n/val)%2==1:
    for i in d:
        if d[i]%2==1:
            l[j][n/(2*val)]=i
            d[i]-=1
            j+=1
    while j<val:
        if l[j][n/(2*val)]=='':
            for i in d:
                if d[i]>0:
                    #print j,val
                    l[j][n/(2*val)]=i
                    l[j+1][n/(2*val)]=i
                    d[i]-=2
                    j+=2
                    break

    #print l,d
    for i in range(val):
        k=1
        q=n/(2*val)
        flag=0
        #while (q+k)<(n/val):
        for ii in d:
            while d[ii]>0:
                #print i,q,k
                l[i][q+k]=ii
                l[i][q-k]=ii
                d[ii]-=2
                k+=1
                if (q+k)>=(n/val):
                    flag=1
                    break
            if flag:
                break

else:
    for i in range(val):
        k=1
        q=n/(2*val)
        flag=0
        for ii in d:
            while d[ii]>0:
                l[i][q+k-1]=ii
                l[i][q-k]=ii
                d[ii]-=2
                k+=1

                if (q+k-1)>=(n/val):
                    flag=1
                    break
            if flag:
                break

print len(l) #,l
for i  in l:
    s=''
    for j in i:
        s+=j
    print s,


from math import *
from fractions import gcd
from itertools import *
import string
import random
def id_generator(size=20, chars=string.digits):
    return ''.join(random.choice(chars) for _ in range(size))

def mp():
    return map(int,str(raw_input()).split())

n=input()
s=str(raw_input())
#n=20
#s='54334701561101776710'
#n=len(s)
#print n
#print s
d={'':0}
for i in range(n):
    try:
        if d[s[i]]:
            d[s[i]]+=1
    except:
        d[s[i]]=1
#print d
ans=0
for i in d:
    if d[i]%2==1:
        ans+=1
ans=max(ans,1)
#print ans
z=[]
for i in range(1,int(sqrt(n))+2):
    if n%i==0:
        z+=[i]
        z+=[n/i]
z=list(set(z))
#print z
z.sort()
val=ans
#print val,z
for i in z:
    if ans==1:
        break
    elif i==ans and (n/i)%2==1:
        break
    elif i>ans and (n/i)%2==1:
        val=i
        break
#print val
l=[['' for i in range(n/val)] for j in range(val)]
#print n/val,z
c=val-ans
cc=[]
for i in range(1,int(sqrt(c))+1):
    if c%i==0:
        cc+=[i]
        cc+=[c/i]
cc=list(set(cc))
cc.sort()
#print cc
cc=cc[1:]
if n/val==1:
    print n
    for i in s:
        print i,
    exit()
for i in range(val):
    j=''
    q=n/(2*val)
    qq=0
    for j in d:
        if d[j]%2==1:
            d[j]-=1
            l[i][q]=j
            qq+=1
            break
        else:
            j=''
    if j=='' and (l[i][q]=='' and (n/val)%2==1):
        if c>0:
            for j in d:
                for k in cc:
                    if d[j]%k==0 and d[j]>0:
                        if (d[j]/k)%2==1:
                            #print k,'lol'
                            for lol in range(i,(i+k)):
                                d[j]-=1
                                #print lol
                                l[lol][q]=j
                            qq=1
                            break
                        else:
                            j=''
                if qq:
                    break

    else:
        if l[i][q]!='':
            qq=1
    #print j,d
    #print l,qq
    while d[j]>0 and (q+qq)<(n/val):
        l[i][q-qq]=j
        l[i][q+qq]=j
        d[j]-=2
        qq+=1

    #print qq,j,d,l,q
    if qq==0:
        while l[i][0]=='':
            j=0
            for j in d:
                if d[j]%2==0 and d[j]>0:
                    break
            if (n/val)%2==1:
                l[i][q]=j
                d[j]-=1
                qq+=1
                while d[j]>0 and (q+qq)<(n/val):
                    #print q,qq
                    l[i][q-qq]=j
                    l[i][q+qq]=j
                    d[j]-=2
                    qq+=1
                    #print l
            else:
                while d[j]>0 and (q+qq)<(n/val):
                    #print q,qq
                    l[i][q-qq-1]=j
                    l[i][q+qq]=j
                    d[j]-=2
                    qq+=1
                    #print l
    else:
        while l[i][0]=='':
            j=0
            for j in d:
                if d[j]%2==0 and d[j]>0:
                    break
            while d[j]>0 and (q+qq)<(n/val):
                #print q,qq
                l[i][q-qq]=j
                l[i][q+qq]=j
                d[j]-=2
                qq+=1
                #print l
    #print
#printing answer
#print l
print len(l)
for i  in l:
    s=''
    for j in i:
        s+=j
    print s,


from math import *
from fractions import gcd
from itertools import *
import string
import random
def id_generator(size=20, chars=string.digits):
    return ''.join(random.choice(chars) for _ in range(size))

def mp():
    return map(int,str(raw_input()).split())

n=input()
s=str(raw_input())
#n=20
#s='54334701561101776710'
#n=len(s)
#print n
#print s
d={'':0}
for i in range(n):
    try:
        if d[s[i]]:
            d[s[i]]+=1
    except:
        d[s[i]]=1
#print d
ans=0
for i in d:
    if d[i]%2==1:
        ans+=1
ans=max(ans,1)
#print ans
z=[]
for i in range(1,int(sqrt(n))+2):
    if n%i==0:
        z+=[i]
        z+=[n/i]
z=list(set(z))
#print z
z.sort()
val=ans
#print val,z
for i in z:
    if ans==1:
        break
    elif i==ans and (n/i)%2==1:
        break
    elif i>ans and (n/i)%2==1:
        val=i
        break
#print val
l=[['' for i in range(n/val)] for j in range(val)]
j=0

if n/val==1:
    print n
    for i in s:
        print i,
    exit()
if val==1:
    print 1
    print s
    exit()
for i in d:
    if d[i]%2==1:
        l[j][n/(2*val)]=i
        d[i]-=1
        j+=1

for i in range(val):
    k=1
    q=n/(2*val)
    flag=0
    #while (q+k)<(n/val):
    for ii in d:
        while d[ii]>0:
            #print i,q,k
            l[i][q+k]=ii
            l[i][q-k]=ii
            d[ii]-=2
            k+=1
            if (q+k)>=(n/val):
                flag=1
                break
        if flag:
            break

print len(l) #,l
for i  in l:
    s=''
    for j in i:
        s+=j
    print s,


from math import *
from fractions import gcd
from itertools import *
import string
import random
def id_generator(size=20, chars=string.digits):
    return ''.join(random.choice(chars) for _ in range(size))

def mp():
    return map(int,str(raw_input()).split())

n=input()
s=str(raw_input())
#n=20
#s='54334701561101776710'
#n=len(s)
#print n
#print s
d={'':0}
for i in range(n):
    try:
        if d[s[i]]:
            d[s[i]]+=1
    except:
        d[s[i]]=1
#print d
ans=0
for i in d:
    if d[i]%2==1:
        ans+=1
ans=max(ans,1)
#print ans
z=[]
for i in range(1,int(sqrt(n))+2):
    if n%i==0:
        z+=[i]
        z+=[n/i]
z=list(set(z))
#print z
z.sort()
val=ans
#print val,z
for i in z:
    if ans==1:
        break
    elif i==ans and (n/i)%2==1:
        break
    elif i>ans and (n/i)%2==1:
        val=i
        break
#print val
l=[['' for i in range(n/val)] for j in range(val)]
j=0

if n/val==1:
    print n
    for i in s:
        print i,
    exit()

if (n/val)%2==1:
    for i in d:
        if d[i]%2==1:
            l[j][n/(2*val)]=i
            d[i]-=1
            j+=1

    for i in range(val):
        k=1
        q=n/(2*val)
        flag=0
        #while (q+k)<(n/val):
        for ii in d:
            while d[ii]>0:
                #print i,q,k
                l[i][q+k]=ii
                l[i][q-k]=ii
                d[ii]-=2
                k+=1
                if (q+k)>=(n/val):
                    flag=1
                    break
            if flag:
                break
else:
    for i in range(val):
        k=1
        q=n/(2*val)
        flag=0
        #while (q+k)<(n/val):
        for ii in d:
            while d[ii]>0:
                #print i,q,k
                l[i][q+k-1]=ii
                l[i][q-k]=ii
                d[ii]-=2
                k+=1

                if (q+k-1)>=(n/val):
                    flag=1
                    break
            if flag:
                break

print len(l) #,l
for i  in l:
    s=''
    for j in i:
        s+=j
    print s,


from math import *
from fractions import gcd
from itertools import *
import string
import random
def id_generator(size=93, chars=string.digits):
    return ''.join(random.choice(chars) for _ in range(size))

def mp():
    return map(int,str(raw_input()).split())

#n=input()
#s=str(raw_input())
n=93
s=id_generator()
s=list(s)
s.sort()
#n=len(s)
print n
print s
d={'':0}
for i in range(n):
    try:
        if d[s[i]]:
            d[s[i]]+=1
    except:
        d[s[i]]=1
print d
ans=0
for i in d:
    if d[i]%2==1:
        ans+=1
ans=max(ans,1)
#print ans
z=[]
for i in range(1,int(sqrt(n))+2):
    if n%i==0:
        z+=[i]
        z+=[n/i]
z=list(set(z))
#print z
z.sort()
val=ans
#print val,z
for i in z:
    if ans==1:
        break
    elif i==ans and (n/i)%2==1:
        break
    elif i>ans and (n/i)%2==1:
        val=i
        break
#print val
l=[['' for i in range(n/val)] for j in range(val)]
#print n/val,z
c=val-ans
cc=[]
for i in range(1,int(sqrt(c))+1):
    if c%i==0:
        cc+=[i]
        cc+=[c/i]
cc=list(set(cc))
cc.sort()
#print cc
cc=cc[1:]
if n/val==1:
    print n
    for i in s:
        print i,
    exit()
for i in range(val):
    j=''
    q=n/(2*val)
    qq=0
    for j in d:
        if d[j]%2==1:
            d[j]-=1
            l[i][q]=j
            qq+=1
            break
        else:
            j=''
    if j=='' and (l[i][q]=='' and (n/val)%2==1):
        if c>0:
            for j in d:
                for k in cc:
                    if d[j]%k==0 and d[j]>0:
                        if (d[j]/k)%2==1:
                            for lol in range(i,(i+k)):
                                d[j]-=1
                                #print lol
                                l[lol][q]=j
                            qq+=1
                            break
                        else:
                            j=''
                if qq:
                    break

    else:
        if l[i][q]!='':
            qq=1
    #print j,d
    #print l,qq
    while d[j]>0 and (q+qq)<(n/val):
        l[i][q-qq]=j
        l[i][q+qq]=j
        d[j]-=2
        qq+=1
    #print qq,j
    if qq==0:
        while l[i][0]=='':
            j=0
            for j in d:
                if d[j]%2==0 and d[j]>0:
                    break
            while d[j]>0 and (q+qq)<(n/val):
                #print q,qq
                l[i][q-qq-1]=j
                l[i][q+qq]=j
                d[j]-=2
                qq+=1
                #print l
    else:
        while l[i][0]=='':
            j=0
            for j in d:
                if d[j]%2==0 and d[j]>0:
                    break
            while d[j]>0 and (q+qq)<(n/val):
                #print q,qq
                l[i][q-qq]=j
                l[i][q+qq]=j
                d[j]-=2
                qq+=1
                #print l
#printing answer
#print l
print len(l)
for i  in l:
    s=''
    for j in i:
        s+=j
    print s,


'''input
20
qqqoqqoqMoqMMMqqMMqM
'''

import re

def readint():
    return int(raw_input())

def readints():
    return map(int, raw_input().split())

def readstr():
    return raw_input().strip()

def readstrs():
    return raw_input().split()

def pickOdd(evens, o, finalLen):
    s = ""
    while finalLen > 1:
        c, cnt = evens.iteritems().next()
        pick = min(cnt / 2, finalLen / 2)
        s += c * pick
        finalLen -= pick * 2
        if cnt == pick * 2:
            evens.pop(c)
        else:
            evens[c] = cnt - pick * 2

    return ''.join([s, o, s[::-1]])

def pickEven(evens, finalLen):
    ans = []
    c, cnt = evens.iteritems().next()
    if cnt == 2:
        evens.pop(c)
    else:
        evens[c] = cnt - 2
    ans.append(pickOdd(evens, c, finalLen))
    ans.append(pickOdd(evens, c, finalLen))
    return ans

def solve():
    ret = []
    evens = {}
    odds = []

    for c in S:
        evens[c] = evens.get(c, 0) + 1

    for c, cnt in evens.items():
        if cnt % 2 == 1:
            odds.append(c)

    for c in odds:
        evens[c] -= 1
        if evens[c] == 0:
            evens.pop(c)

    minCnt = len(odds)
    if minCnt <= 0:
        return [pickOdd(evens, '', len(S))]

    for finalCnt in xrange(minCnt, n+1, 2):
        if n % finalCnt == 0 and (n / finalCnt) % 2 == 1: break
    finalLen = n / finalCnt

    for o in odds:
        ret.append(pickOdd(evens, o, finalLen))
    while len(ret) < finalCnt:
        ret.extend(pickEven(evens, finalLen))
    return sorted(ret)

n = readint()
S = readstr()

ans = solve()
print len(ans)
print ' '.join(ans)


'''input
2
aaaaddddddabaacaaaaaaaaaaaa
'''

import re

def readint():
    return int(raw_input())

def readints():
    return map(int, raw_input().split())

def readstr():
    return raw_input().strip()

def readstrs():
    return raw_input().split()

def pickOdd(evens, o, finalLen):
    s = ""
    while finalLen > 1:
        c, cnt = evens.iteritems().next()
        pick = min(cnt / 2, finalLen / 2)
        s += c * pick
        finalLen -= pick * 2
        if cnt == pick * 2:
            evens.pop(c)
        else:
            evens[c] = cnt - pick * 2

    return ''.join([s, o, s[::-1]])

def pickEven(evens, finalLen):
    ans = []
    c, cnt = evens.iteritems().next()
    if cnt == 2:
        evens.pop(c)
    else:
        evens[c] = cnt - 2
    ans.append(pickOdd(evens, c, finalLen))
    ans.append(pickOdd(evens, c, finalLen))
    return ans

def solve():
    ret = []
    evens = {}
    odds = []

    for c in S:
        evens[c] = evens.get(c, 0) + 1

    for c, cnt in evens.items():
        if cnt % 2 == 1:
            odds.append(c)

    for c in odds:
        evens[c] -= 1
        if evens[c] == 0:
            evens.pop(c)

    minCnt = len(odds)
    if minCnt <= 0:
        return [pickOdd(evens, '', len(S))]
    slen = len(S)

    for finalCnt in xrange(minCnt, len(S)+1, 2):
        if slen % minCnt == 0 and (slen / minCnt) % 2 == 1: break
    finalLen = slen / finalCnt

    for o in odds:
        ret.append(pickOdd(evens, o, finalLen))
    while len(ret) < finalCnt:
        ret.extend(pickEven(evens, finalLen))
    return sorted(ret)

n = readint()
S = readstr()

ans = solve()
print len(ans)
print ' '.join(ans)


from collections import *
n = input()
s = raw_input()
c = Counter(s)
odd = []
even = []
for k in c.keys():
    if c[k]&1:
        odd.append(k)
    else:
        even.append(k)
if len(odd)==0:
    ans = []
    ans_s = ''
    for k in c.keys():
        ans_s = k*(c[k]/2)+ans_s+k*(c[k]/2)
    ans.append(ans_s)
elif n%(len(odd))==0:
    ans = []
    if (n/len(odd))&1:
        l_each = n/len(odd)
        for i in range(len(odd)):
            ans.append(odd[i])
            c[odd[i]]-=1
        ind = 0
        mod = len(odd)
        for k in c.keys():
            while c[k]%2==0 and c[k]>0:
                ans[ind%mod] = k+ans[ind%mod]+k
                c[k]-=2
                ind += 1
    else:
        ls = len(odd)
        while not (ls<n and n%ls==0 and (n/ls)&1):
            ls += 2
        l_each = n/ls
        for i in range(len(odd)):
            ans.append(odd[i])
            c[odd[i]]-=1
        eind = 0
        while len(ans)<ls:
            if c[even[eind]]>0:
                ans.append(even[eind])
                ans.append(even[eind])
                c[even[eind]]-=2
            if c[even[eind]]==0:
                eind += 1
        ind = 0
        mod = ls
        for k in c.keys():
            while c[k]%2==0 and c[k]>0:
                ans[ind%mod] = k+ans[ind%mod]+k
                c[k]-=2
                ind += 1
else:
    ans = list(s)
print len(ans)
print " ".join(ans)


from collections import *
n = input()
s = raw_input()
c = Counter(s)
odd = []
even = []
for k in c.keys():
    if c[k]&1:
        odd.append(k)
    else:
        even.append(k)
if len(odd)==0:
    ans = []
    ans_s = ''
    for k in c.keys():
        ans_s = k*(c[k]/2)+ans_s+k*(c[k]/2)
    ans.append(ans_s)
elif len(odd)>(n/3):
    ans = list(s)
else:
    l_each = 1
    a_each = l_each
    while l_each<=n:
        if n%l_each==0 and (n/l_each)%2==len(odd)%2 and len(odd)<=(n/l_each):
            a_each = l_each
        l_each += 2
    a_each = min(n,a_each)
    if a_each==1:
        ans = list(s)
    else:
        ans = ['']*(n/a_each)
        mod = n/a_each
        i = 0
        while i<len(odd):
            ans[i] += odd[i]
            c[odd[i]] -=1
            i+=1
        eind = 0
        i = len(odd)
        while i<(n/a_each):
            ans[i] += even[eind]
            ans[i+1] += even[eind]
            c[even[eind]] -= 2
            if c[even[eind]]==0:
                eind += 1
            i+=2
        ind = 0
        for k in c.keys():
            while c[k]%2==0 and c[k]>0:
                ans[ind%mod] = k+ans[ind%mod]+k
                c[k]-=2
                ind += 1

print len(ans)
print " ".join(ans)


from collections import *
n = input()
s = raw_input()
c = Counter(s)
odd = []
even = []
for k in c.keys():
    if c[k]&1:
        odd.append(k)
    else:
        even.append(k)
if len(odd)==0:
    ans = []
    ans_s = ''
    for k in c.keys():
        ans_s = k*(c[k]/2)+ans_s+k*(c[k]/2)
    ans.append(ans_s)
elif len(odd)>(n/3):
    ans = list(s)
else:
    l_each = 1
    a_each = l_each
    while l_each<=n:
        if n%l_each==0 and (n/l_each)%2==len(odd)%2 and len(odd)<=(n/l_each):
            a_each = l_each
        l_each += 2
    a_each = min(n,a_each)
    if a_each==1 or len(odd)>(n/a_each):
        ans = list(s)
    else:
        ans = ['']*(n/a_each)
        mod = n/a_each
        i = 0
        while i<len(odd):
            ans[i] += odd[i]
            c[odd[i]] -=1
            i+=1
        i = len(odd)

        even = c.keys()
        eind = 0
        while eind<len(even) and i<(n/a_each-1):
            if c[even[eind]]>0:
                ans[i] += even[eind]
                ans[i+1] += even[eind]
                c[even[eind]] -= 2
            if c[even[eind]]==0:
                eind += 1
            i+=2
        ind = 0
        for k in c.keys():
            while c[k]%2==0 and c[k]>0:
                ans[ind%mod] = k+ans[ind%mod]+k
                c[k]-=2
                ind += 1

print len(ans)
print " ".join(ans)


from collections import *
n = input()
s = raw_input()
c = Counter(s)
odd = []
even = []
for k in c.keys():
    if c[k]&1:
        odd.append(k)
    else:
        even.append(k)
if len(odd)==0:
    ans = []
    ans_s = ''
    for k in c.keys():
        ans_s = k*(c[k]/2)+ans_s+k*(c[k]/2)
    ans.append(ans_s)
elif n%(len(odd))==0 and (n/len(odd))&1:
    l_each = n/len(odd)
    ans = []
    for i in range(len(odd)):
        ans.append(odd[i])
        c[odd[i]]-=1
    ind = 0
    mod = len(odd)
    for k in c.keys():
        while c[k]%2==0 and c[k]>0:
            ans[ind%mod] = k+ans[ind%mod]+k
            c[k]-=2
            ind += 1
else:
    ans = list(s)
print len(ans)
print " ".join(ans)


from collections import *
n = input()
s = raw_input()
c = Counter(s)
odd = []
even = []
for k in c.keys():
    if c[k]&1:
        odd.append(k)
    else:
        even.append(k)
if len(odd)==0:
    ans = []
    ans_s = ''
    for k in c.keys():
        ans_s = k*(c[k]/2)+ans_s+k*(c[k]/2)
    ans.append(ans_s)
elif len(odd)>(n/3):
    ans = list(s)
else:
    l_each = 1
    a_each = l_each
    while l_each<=n:
        if n%l_each==0 and (n/l_each)%2==len(odd)%2 and len(odd)<=(n/l_each):
            a_each = l_each
        l_each += 2
    a_each = min(n,a_each)
    if a_each==1:
        ans = list(s)
    else:
        ans = ['']*(n/a_each)
        mod = n/a_each
        for i in range(len(odd)):
            ans[i] += odd[i]
            c[odd[i]] -=1
        eind = 0
        for i in range(len(odd),n/a_each,2):
            ans[i] += even[eind]
            ans[i+1] += even[eind]
            c[even[eind]] -= 2
            if c[eind]==0:
                eind += 1
        ind = 0
        for k in c.keys():
            while c[k]%2==0 and c[k]>0:
                ans[ind%mod] = k+ans[ind%mod]+k
                c[k]-=2
                ind += 1

print len(ans)
print " ".join(ans)


from collections import *
n = input()
s = raw_input()
c = Counter(s)
odd = []
even = []
for k in c.keys():
    if c[k]&1:
        odd.append(k)
    else:
        even.append(k)
if len(odd)==0:
    ans = []
    ans_s = ''
    for k in c.keys():
        ans_s = k*(c[k]/2)+ans_s+k*(c[k]/2)
    ans.append(ans_s)
elif n%(len(odd))==0 and (n/len(odd))&1:
    ans = []
    if True:
        l_each = n/len(odd)
        for i in range(len(odd)):
            ans.append(odd[i])
            c[odd[i]]-=1
        ind = 0
        mod = len(odd)
        for k in c.keys():
            while c[k]%2==0 and c[k]>0:
                ans[ind%mod] = k+ans[ind%mod]+k
                c[k]-=2
                ind += 1
else:
    ans = []
    ls = len(odd)
    while ls<n and not (n%ls==0 and (n/ls)&1):
        ls += 2
    ls = min(n,ls)
    if ls==n:
        ans = list(s)
    else:
        l_each = n/ls
        for i in range(len(odd)):
            ans.append(odd[i])
            c[odd[i]]-=1
        eind = 0
        while eind<len(even) and len(ans)<ls:
            if c[even[eind]]>0:
                ans.append(even[eind])
                ans.append(even[eind])
                c[even[eind]]-=2
            if c[even[eind]]==0:
                eind += 1
        ind = 0
        mod = ls
        for k in c.keys():
            while c[k]%2==0 and c[k]>0:
                ans[ind%mod] = k+ans[ind%mod]+k
                c[k]-=2
                ind += 1
# else:
#     ans = list(s)
print len(ans)
print " ".join(ans)


from collections import *
n = input()
s = raw_input()
c = Counter(s)
odd = []
even = []
for k in c.keys():
    if c[k]&1:
        odd.append(k)
    else:
        even.append(k)
if len(odd)==0:
    ans = []
    ans_s = ''
    for k in c.keys():
        ans_s = k*(c[k]/2)+ans_s+k*(c[k]/2)
    ans.append(ans_s)
elif len(odd)>(n/3):
    ans = list(s)
else:
    l_each = 1
    a_each = l_each
    while l_each<=n:
        if n%l_each==0 and (n/l_each)%2==len(odd)%2 and len(odd)<=(n/l_each):
            a_each = l_each
        l_each += 2
    a_each = min(n,a_each)
    if a_each==1 or len(odd)>(n/a_each):
        ans = list(s)
    else:
        ans = ['']*(n/a_each)
        mod = n/a_each
        i = 0
        while i<len(odd):
            ans[i] += odd[i]
            c[odd[i]] -=1
            i+=1
        i = len(odd)

        even = c.keys()
        eind = 0
        while eind<len(even) and i<(n/a_each-1):
            if c[even[eind]]>0:
                ans[i] += even[eind]
                ans[i+1] += even[eind]
                c[even[eind]] -= 2
            if c[even[eind]]==0:
                eind += 1
            i+=2
        ind = 0
        for k in c.keys():
            while c[k]%2==0 and c[k]>0:
                need = a_each-len(ans[ind%mod])
                have = c[k]
                canbe = min(need,have)
                ans[ind%mod] = (canbe/2)*k+ans[ind%mod]+(canbe/2)*k
                c[k]-=canbe
                if len(ans[ind%mod])==a_each:
                    ind += 1

print len(ans)
print " ".join(ans)


from collections import *
n = input()
s = raw_input()
c = Counter(s)
odd = []
even = []
for k in c.keys():
    if c[k]&1:
        odd.append(k)
    else:
        even.append(k)
if len(odd)==0:
    ans = []
    ans_s = ''
    for k in c.keys():
        ans_s = k*(c[k]/2)+ans_s+k*(c[k]/2)
    ans.append(ans_s)
elif len(odd)>(n/3):
    ans = list(s)
else:
    l_each = 1
    a_each = l_each
    while l_each<=n:
        if n%l_each==0 and (n/l_each)%2==len(odd)%2 and len(odd)<=(n/l_each):
            a_each = l_each
        l_each += 2
    a_each = min(n,a_each)
    if a_each==1:
        ans = list(s)
    else:
        ans = ['']*(n/a_each)
        mod = n/a_each
        for i in range(len(odd)):
            ans[i] += odd[i]
            c[odd[i]] -=1
        eind = 0
        for i in range(len(odd),n/a_each,2):
            ans[i] += even[eind]
            ans[i+1] += even[eind]
            c[even[eind]] -= 2
            if c[even[eind]]==0:
                eind += 1
        ind = 0
        for k in c.keys():
            while c[k]%2==0 and c[k]>0:
                ans[ind%mod] = k+ans[ind%mod]+k
                c[k]-=2
                ind += 1

print len(ans)
print " ".join(ans)


from collections import Counter
n = int(raw_input())
s = raw_input()
C = Counter()
for c in s:
    C[c] += 1

odd = 0
for c, v in C.items():
    if v%2 == 1: odd += 1

l = -1
if odd == 0:
    s = ''
    for c, v in C.items():
        s += c*(v//2)
    print(1)
    print(s + s[::-1])
else:
    for ll in range(n, 0, -1):
        if n%ll != 0: continue
        if n//ll >= odd and ll%2 == 1:
            l = ll
            break
    nbr = n//l
    out = []
    C = list(map(tuple, C.items()))
    for i in range(nbr):
        for i, (c, v) in enumerate(C):
            if v%2 == 1:
                break
        if v == 0:
            i, c, v = next((a, b, c) for a, (b, c) in enumerate(C) if c != 0)

        C[i] = (c, v - 1)
        m = c
        s = []
        left = l//2
        for i, (c, v) in enumerate(C):
            sub = min(v//2,left)
            s += [c]*sub
            C[i] = (c, v - sub*2)
            left -=sub
        ss = ''.join(s)
        out.append(ss + m + ss[::-1])
    print(len(out))
    print(' '.join(out))


#include<bits/stdc++.h>
using namespace std;
int main(){
    int tt;
    cin>>tt;
    while(tt--){
        int l,r;
        cin>>l>>r;
        if(l*2>r){
            cout<<-1<<" "<<-1;
            cout<<endl;
        }
        else{
            cout<<l<<" "<<r<<endl;
        }
    }
}


#include<bits/stdc++.h>
using namespace std;
int gcd_(int a,int b){
      if (a == 0)
        return b;
    return gcd_(b % a, a);
}
int main(){
    long long int tt;
    cin>>tt;
    while(tt--){
       int l,r;
       cin>>l>>r;
       long long int lcm_;
       long long int gcd__;
       int l_value=0,r_value=0;
       int flag=0;
        for(int i=l;i<=r-1;i++){
             for(int j=i+1;j<=r;j++){
               gcd__= gcd_(i,j);
               lcm_=(i*j)/gcd__;
               if(lcm_>=l && lcm_<=r){
                   flag=1;
                   l_value=i;
                   r_value=j;
                   break;
               }
             }
             if(flag==1)break;
        }
        if(flag==1){cout<<l_value<<" "<<r_value;}
        else{cout<<-1<<" "<<-1;}
        cout<<endl;

    }
}


#include<bits/stdc++.h>
using namespace std;
int gcd_(int a,int b){
      if (a == 0)
        return b;
    return gcd_(b % a, a);
}
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    long long int tt;
    cin>>tt;
    while(tt--){
       int l,r;
       cin>>l>>r;
       long long int lcm_;
       long long int gcd__;
       int l_value=0,r_value=0;
       int flag=0;
       if(l>1000000000){cout<<-1<<" "<<-1;continue};
        for(int i=l;i<=r-1;i++){
             for(int j=i+1;j<=r;j++){
               gcd__= gcd_(i,j);
               lcm_=i*(j/gcd__);
               if(lcm_>=l && lcm_<=r){
                   flag=1;
                   l_value=i;
                   r_value=j;
                   break;
               }
             }

             if(flag==1)break;
        }
        last:if(flag==1){cout<<l_value<<" "<<r_value;}
             else{cout<<-1<<" "<<-1;}
        cout<<endl;

    }
}


#include<bits/stdc++.h>
using namespace std;
int gcd_(int a,int b){
      if (a == 0)
        return b;
    return gcd_(b % a, a);
}
int main(){
    long long int tt;
    cin>>tt;
    while(tt--){
       int l,r;
       cin>>l>>r;
       long long int lcm_;
       long long int gcd__;
       int l_value=0,r_value=0;
       int flag=0;
        for(int i=l;i<=r-1;i++){
             for(int j=i+1;j<=r;j++){
               gcd__= gcd_(i,j);
               lcm_=i*(j/gcd__);
               if(lcm_>=l && lcm_<=r){
                    cout<<lcm_;
                   cout<<endl;
                   flag=1;
                   l_value=i;
                   r_value=j;
                   break;
               }
             }
             if(flag==1)break;
        }
        if(flag==1){cout<<l_value<<" "<<r_value;}
        else{cout<<-1<<" "<<-1;}
        cout<<endl;

    }
}


#include<bits/stdc++.h>
using namespace std;
int main(){
    int tt;
    cin>>tt;
    while(tt--){
        int l,r;
        cin>>l>>r;
        if(l*2>r){
            cout<<-1<<" "<<-1;
            cout<<endl;
        }
        else{
            cout<<l<<" "<<l*2<<endl;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;

long long gcd (long long a, long long b) {
	while (b) {
		a %= b;
		swap (a, b);
	}
	return a;
}

long long lcm (long long a, long long b) {
	return a / gcd (a, b)*b;
}

main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    while(t--){
        long long a,b;
        cin >> a >> b;
        bool z=0;
        for(long long i=a;i<=b;i++){
            for(long long j=b;j>=i+1;j--){
                long long k=lcm(i,j);
                if(k>=a&&k<=b){
                    cout << i << ' ' << j << '\n';
                    z=true;
                    break;
                }
            }
            if(z) break;
        }
        if(!z) cout << "-1 -1" << '\n';
    }
}


#include <bits/stdc++.h>
using namespace std;

long long gcd (long long a, long long b) {
	while (b) {
		a %= b;
		swap (a, b);
	}
	return a;
}

long long lcm (long long a, long long b) {
	return a / gcd (a, b)*b;
}

main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    while(t--){
        long long a,b;
        cin >> a >> b;
        bool z=0;
        for(long long i=a;i<=b/2+1;i++){
            for(long long j=i*2-1;j<=b;j++){
                long long k=lcm(i,j);
                if(k>=a&&k<=b){
                    cout << i << ' ' << j << '\n';
                    z=true;
                    break;
                }
            }
            if(z) break;
        }
        if(!z) cout << "-1 -1" << '\n';
    }
}


#include <bits/stdc++.h>
using namespace std;

long long gcd (long long a, long long b) {
	while (b) {
		a %= b;
		swap (a, b);
	}
	return a;
}

long long lcm (long long a, long long b) {
	return a / gcd (a, b)*b;
}

main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    while(t--){
        long long a,b;
        cin >> a >> b;
        bool z=0;
        for(long long i=a;i<=b;i++){
            for(long long j=i+1;j<=b;j--){
                long long k=lcm(i,j);
                if(k>=a&&k<=b){
                    cout << i << ' ' << j << '\n';
                    z=true;
                    break;
                }
            }
            if(z) break;
        }
        if(!z) cout << "-1 -1" << '\n';
    }
}


#include <bits/stdc++.h>
using namespace std;

int gcd (int a, int b) {
	while (b) {
		a %= b;
		swap (a, b);
	}
	return a;
}

int lcm (int a, int b) {
	return a / gcd (a, b)*b;
}

main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    while(t--){
        int a,b;
        cin >> a >> b;
        bool z=0;
        for(int i=a;i<=b;i++){
            for(int j=b;j>=i+1;j--){
                int k=lcm(i,j);
                if(k>=a&&k<=b){
                    cout << i << ' ' << j << '\n';
                    z=true;
                    break;
                }
            }
            if(z) break;
        }
        if(!z) cout << "-1 -1" << '\n';
    }
}


#include <bits/stdc++.h>
using namespace std;

long long gcd (long long a, long long b) {
	while (b) {
		a %= b;
		swap (a, b);
	}
	return a;
}

long long lcm (long long a, long long b) {
	return a / gcd (a, b)*b;
}

main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    while(t--){
        long long a,b;
        cin >> a >> b;
        bool z=0;
        for(long long i=a;i<=b/2+1;i++){
            for(long long j=i+1;j<=b;j++){
                long long k=lcm(i,j);
                if(k>=a&&k<=b){
                    cout << i << ' ' << j << '\n';
                    z=true;
                    break;
                }
            }
            if(z) break;
        }
        if(!z) cout << "-1 -1" << '\n';
    }
}


#include <bits/stdc++.h>
using namespace std;

long long gcd (long long a, long long b) {
	while (b) {
		a %= b;
		swap (a, b);
	}
	return a;
}

long long lcm (long long a, long long b) {
	return a / gcd (a, b)*b;
}

main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    while(t--){
        long long a,b;
        cin >> a >> b;
        bool z=0;
        for(long long i=a;i<=b/2+1;i++){
            for(long long j=i*2;j<=b;j++){
                long long k=lcm(i,j);
                if(k>=a&&k<=b){
                    cout << i << ' ' << j << '\n';
                    z=true;
                    break;
                }
            }
            if(z) break;
        }
        if(!z) cout << "-1 -1" << '\n';
    }
}


#include <bits/stdc++.h>
using namespace std;

long long gcd (long long a, long long b) {
	while (b) {
		a %= b;
		swap (a, b);
	}
	return a;
}

long long lcm (long long a, long long b) {
	return a / gcd (a, b)*b;
}

main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    while(t--){
        long long a,b;
        cin >> a >> b;
        bool z=0;
        for(long long i=a;i<=b;i++){
            for(long long j=i+1;j<=b;j++){
                long long k=lcm(i,j);
                if(k>=a&&k<=b){
                    cout << i << ' ' << j << '\n';
                    z=true;
                    break;
                }
            }
            if(z) break;
        }
        if(!z) cout << "-1 -1" << '\n';
    }
}


#include <bits/stdc++.h>
using namespace std;

int gcd (int a, int b) {
	while (b) {
		a %= b;
		swap (a, b);
	}
	return a;
}

int lcm (int a, int b) {
	return a / gcd (a, b)*b;
}

main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    while(t--){
        int a,b;
        cin >> a >> b;
        bool z=0;
        for(int i=a;i<=b;i++){
            for(int j=i+1;j<=b;j++){
                int k=lcm(i,j);
                if(k>=a&&k<=b){
                    cout << k << ' ';
                    cout << i << ' ' << j << '\n';
                    z=true;
                    break;
                }
            }
            if(z) break;
        }
        if(!z) cout << "-1 -1" << '\n';
    }
}