You are given the string *s* of length *n* and the numbers *p*, *q*. Split the string *s* to pieces of length *p* and *q*.

For example, the string "Hello" for *p* = 2, *q* = 3 can be split to the two strings "Hel" and "lo" or to the two strings "He" and "llo".

Note it is allowed to split the string *s* to the strings only of length *p* or to the strings only of length *q* (see the second sample test).
The first line contains three positive integers *n*, *p*, *q* (1 ≤ *p*, *q* ≤ *n* ≤ 100).

The second line contains the string *s* consists of lowercase and uppercase latin letters and digits.
none
5 2 3
Hello
2
He
llo
10 9 5
Codeforces
2
Codef
orces
6 4 5
Privet
-1
8 1 1
abacabac
8
a
b
a
c
a
b
a
c
1 1 1
1
1
1
10 8 1
uTl9w4lcdo
10
u
T
l
9
w
4
l
c
d
o
20 6 4
fmFRpk2NrzSvnQC9gB61
5
fmFR
pk2N
rzSv
nQC9
gB61
30 23 6
WXDjl9kitaDTY673R5xyTlbL9gqeQ6
5
WXDjl9
kitaDT
Y673R5
xyTlbL
9gqeQ6
40 14 3
SOHBIkWEv7ScrkHgMtFFxP9G7JQLYXFoH1sJDAde
6
SOHBIkWEv7Scrk
HgMtFFxP9G7JQL
YXF
oH1
sJD
Ade
50 16 3
XCgVJUu4aMQ7HMxZjNxe3XARNiahK303g9y7NV8oN6tWdyXrlu
8
XCgVJUu4aMQ7HMxZ
jNxe3XARNiahK303
g9y
7NV
8oN
6tW
dyX
rlu
60 52 8
hae0PYwXcW2ziQCOSci5VaElHLZCZI81ULSHgpyG3fuZaP0fHjN4hCKogONj
2
hae0PYwXcW2ziQCOSci5VaElHLZCZI81ULSHgpyG3fuZaP0fHjN4
hCKogONj
70 50 5
1BH1ECq7hjzooQOZdbiYHTAgATcP5mxI7kLI9rqA9AriWc9kE5KoLa1zmuTDFsd2ClAPPY
14
1BH1E
Cq7hj
zooQO
ZdbiY
HTAgA
TcP5m
xI7kL
I9rqA
9AriW
c9kE5
KoLa1
zmuTD
Fsd2C
lAPPY
80 51 8
o2mpu1FCofuiLQb472qczCNHfVzz5TfJtVMrzgN3ff7FwlAY0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
a
a
a
a
a
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
99 2 4
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-1
11 2 3
havanahavan
4
ha
van
aha
van
100 2 2
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
50
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
17 3 5
gopstopmipodoshli
5
gop
sto
pmi
pod
oshli
5 4 3
foyku
-1
99 2 2
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
-1
99 2 2
recursionishellrecursionishellrecursionishellrecursionishellrecursionishellrecursionishelldontuseit
-1
11 2 3
qibwnnvqqgo
4
qi
bwn
nvq
qgo
4 4 3
hhhh
1
hhhh
99 2 2
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-1
99 2 5
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
21
hh
hh
hhhhh
hhhhh
hhhhh
hhhhh
hhhhh
hhhhh
hhhhh
hhhhh
hhhhh
hhhhh
hhhhh
hhhhh
hhhhh
hhhhh
hhhhh
hhhhh
hhhhh
hh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 5 2
aaaaa
1
aaaaa
4 3 2
zyxw
2
zy
xw
5 4 3
zyxwv
-1
95 3 29
abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcab
23
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abcabcabcabcabcabcabcabcabcab
3 2 2
aaa
-1
91 62 3
fjzhkfwzoabaauvbkuzaahkozofaophaafhfpuhobufawkzbavaazwavwppfwapkapaofbfjwaavajojgjguahphofj
-1
99 2 2
abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc
-1
56 13 5
abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcab
8
abcabcabcabca
bcabcabcabcab
cabca
bcabc
abcab
cabca
bcabc
abcab
79 7 31
abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabca
-1
92 79 6
xlvplpckwnhmctoethhslkcyashqtsoeltriddglfwtgkfvkvgytygbcyohrvcxvosdioqvackxiuifmkgdngvbbudcb
-1
48 16 13
ibhfinipihcbsqnvtgsbkobepmwymlyfmlfgblvhlfhyojsy
3
ibhfinipihcbsqnv
tgsbkobepmwymlyf
mlfgblvhlfhyojsy
16 3 7
aaaaaaaaaaaaaaaa
4
aaa
aaa
aaa
aaaaaaa
11 10 3
aaaaaaaaaaa
-1
11 8 8
aaaaaaaaaaa
-1
11 7 3
aaaaaaaaaaa
-1
41 3 4
abcabcabcabcabcabcabcabcabcabcabcabcabcab
11
abc
abc
abc
abca
bcab
cabc
abca
bcab
cabc
abca
bcab
11 3 2
aaaaaaaaaaa
5
aaa
aa
aa
aa
aa
14 9 4
abcdefghijklmn
-1
9 9 5
123456789
1
123456789
92 10 41
meotryyfneonmnrvfnhqlehlxtvpracifpadcofecvbikoitrlgeftiqofpvacgocrdiquhatlqosqvtduenaqkwrnnw
3
meotryyfne
onmnrvfnhqlehlxtvpracifpadcofecvbikoitrlg
eftiqofpvacgocrdiquhatlqosqvtduenaqkwrnnw
17 16 3
dxyhgtsxtuyljmclj
-1
82 13 30
fmtwumakkejtolxqxrnydhqoufwtdwldfxcfjrndauqcarhbwmdwxsxfbqjsfspuxobywhcrvlndsdmkqd
5
fmtwumakkejto
lxqxrnydhqouf
wtdwldfxcfjrn
dauqcarhbwmdw
xsxfbqjsfspuxobywhcrvlndsdmkqd
95 3 3
ihnfqcswushyoirjxlxxnwqtwtaowounkumxukwpacxwatimhhhoggqwkkspcplvyndfukbxickcixidgxkjtnpkoeiwlor
-1
7 5 3
zyxwvut
-1
17 16 4
ctvfhkiakagcilrdw
-1
n,p,q = map(int,input().split())

s = input()

def problem6(n,p,q,s):
    global string
    string = s
    size = len(string)
    palabras = []
    
    
    pbool = size<2*p
    qbool = size<2*q
    
    if pbool and qbool:
        if len(string)==1:
            print("1")
            print(string)
        else:
            print(-1)
        return
    else:
        
        if (p+q)==size:
            print("2")
            print(string[:p])
            print(string[p:p+q])
            return
            
        cont = 1   
        
        
        if size%p==0:
            print(int(size/p))
            for i in range(0,size,p):
                print(string[:p])
                string = string[i:]
            return
                
        if size%q==0:
            print(int(size/q))
            for i in range(0,size,q):
                print(string[:q])
                string = string[i:]
            return
        
        flag = True
        if p>q:
            while flag:
                cont += 1
                size = size-p
                if size%q==0:
                    for i in range(0,(p*cont-p),p):
                        string = string[i:]
                        palabras.append( (string[:p]) )
                        
                    string = string[p:]   
                    restante = int(size/q)
                    for i in range(0,q*restante,q):
                        string = string[i:]
                        palabras.append(string[:q])
                       
                    print(len(palabras))
                    for i in palabras:
                        print (i)
                    return
                
        else:
            while flag:
                cont += 1
                size = size-q
                if size%p==0:
                    for i in range(0,(q*cont-q),q):
                        string = string[i:]
                        palabras.append( (string[:q]) )
                        
                    string = string[q:]   
                    restante = int(size/p)
                    for i in range(0,p*restante,p):
                        string = string[i:]
                        palabras.append(string[:p])
                       
                    print(len(palabras))
                    for i in palabras:
                        print (i)
                    return
        


problem6(n,p,q,s)
