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).


-----Input-----

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.


-----Output-----

If it's impossible to split the string s to the strings of length p and q print the only number "-1".

Otherwise in the first line print integer k — the number of strings in partition of s.

Each of the next k lines should contain the strings in partition. Each string should be of the length p or q. The string should be in order of their appearing in string s — from left to right.

If there are several solutions print any of them.


-----Examples-----
Input
5 2 3
Hello

Output
2
He
llo

Input
10 9 5
Codeforces

Output
2
Codef
orces

Input
6 4 5
Privet

Output
-1

Input
8 1 1
abacabac

Output
8
a
b
a
c
a
b
a
c

Difficulty: interview

Starter code:

Solutions:
a, b, c = map(int, input().split(' '))
x = input()
for i in range(105):
    for j in range(105):
        if i*b+j*c == a:
            print(i+j)
            for k in range(i):
                print(x[:b])
                x = x[b:]
            for l in range(j):
                print(x[:c])
                x = x[c:]
            quit()
print(-1)

n, p, q = list(map(int, input().split(" ")))
s=input()

c=-1

for i in range (n+1):
    for j in range (n+1):
        if p*i+q*j==n:
            c=i
            d=j
            break
    if c!=-1:
        break

if c==-1:
    print(-1)
else:
    print(c+d)
    for i in range (c):
        print(s[p*i:p*(i+1)])
    e=c*p
    for j in range (d):
        print(s[e+q*j:e+q*(j+1)])


def main():
    items=input().split()
    n=int(items[0])
    p=int(items[1])
    q=int(items[2])
    s=input()
    A=int(n/p)
    for a in range(A+1):
        forq=n-a*p
        if forq%q==0:
            b=int(forq/q)
            print(a+b)
            for i in range(a):
                print(s[i*p:(i+1)*p])
            for i in range(b):
                print(s[a*p+i*q:a*p+(i+1)*q])
            return
    print(-1)
    
def __starting_point():
    main()

__starting_point()

n,p,q=list(map(int, input().split(" ")))
s = input()
asdf = False
for i in range(n//p+1):
    for j in range((n-i*p)//q+1):
        if i*p+j*q == n and asdf == False:
            print(i+j)
            asdf = True
            for a in range(i):
                print(s[a*p:(a+1)*p])
            for b in range(j):
                print(s[p*i+b*q:p*i+(b+1)*q])
if asdf == False:
    print(-1)
            


n, p, q = map(int, input().split())
s = input()
for i in range(n // p + 1):
    if (n - i * p) % q == 0:
        print(i + (n - i * p) // q)
        for j in range(i):
            print(s[j * p:j * p + p])
        for j in range((n - i * p) // q):
            print(s[i * p + j * q: i * p + j * q + q])
        return
print(-1)

n, a, b = map(int, input().split())
s = input()
k1, k2 = 0, 0
for i in range(n + 1):
    for j in range(n + 1):
        if i * a + j * b == n:
            k1 = i
            k2 = j
            break
    if k1 or k2:
        break
else:
    print('-1')

if k1 or k2:
    print(k1 + k2)
    i = 0
    while k1:
        print(s[i: i + a])
        k1 -= 1
        i += a
    while k2:
        print(s[i: i + b])
        k2 -= 1
        i += b

#The Text Splitting.py
import os
n, a, b = list(map(int, input().split()))
s = input()
maxn = n // a
# print(s)
x = -1
for i in range(0, maxn+1):
	tmp = n - a*i
	if tmp % b == 0:
		x = i
		break
if x != -1:
	print(x + (n - a*x) // b)
	out = ""
	for i in range(0, x):
		out = s[a*i:(i+1)*a]
		print(out)
	y = (n - a*x) // b
	for i in range(0, y):
		out = s[b*i+a*x:(i+1)*b+a*x]
		print(out)
else:
	print("-1")
#os.system("pause")


import math

def euclid_algorithm(a, b):
    t1, t2 = abs(a), abs(b)
    #saving equalities:
    #t1 == x1 * a + y1 * b,
    #t2 == x2 * a + y2 * b. 
    x1, y1, x2, y2 = int(math.copysign(1, a)), 0, 0, int(math.copysign(1, b))
    if t1 < t2:
        t1, t2 = t2, t1
        x1, y1, x2, y2 = x2, y2, x1, y1

    while t2 > 0:
        if x1 * a + y1 * b != t1:
            print('inshalla')
        k = int(t1 // t2)
        t1, t2 = t2, t1 % t2
        #t1 - k * t2 == (x1 - k * x2) * a + (y1 - k * y2) * b
        x1, y1, x2, y2 = x2, y2, x1 - k * x2, y1 - k * y2

    return t1, x1, y1

def opposite_element(x, p):
    gcd, k, l = euclid_algorithm(x, p)
    if gcd != 1:
        return -1
    return k % p

def fact_mod(n, p):
    prod = 1
    for i in range(2,n+1):
        prod *= i
        prod %= p
    return prod

n, p, q = [int(x) for x in input().split()]
s = input().rstrip()
for i in range(n // p + 1):
    if (n - p*i) % q == 0:
        j = (n - p*i) // q
        print(i+j)
        for k in range(i):
            print(s[k*p:(k+1)*p])
        for k in range(j):
            print(s[p*i + k*q: p*i + (k+1)*q])
        break
else:
    print(-1)
    


n, a, b = list(map(int, input().split(' ')))

s = input()

c = 0
while c * a <= n and (n - c * a) % b != 0:
    c += 1

if c * a > n:
    print(-1)
else:
    cb = (n - a * c) // b
    print(c + cb)
    for i in range(c):
        print(s[a * i: a * (i + 1)])
    for i in range(cb):
        print(s[c * a + b * i: c * a + b * (i + 1)])


n, p, q = list(map(int, input().split()))
s = input()

k1 = 0
k = 0

r = n // p

for i in range(r, -1, -1):
    if (n - p * i) % q == 0:
        k1 = i
        k = k1 + ((n - p * i) // q)


if k == 0:
    print(-1)
else:
    print(k)
    for i in range(k1):
        print(s[i*p: (i+1)*p])
    for i in range(k - k1):
        print(s[p*k1 + i*q: p*k1 + (i + 1)*q])


n, p, q = list(map(int, input().split()))
s = input()
m = 0
while m * p <= n:
    if (n - m * p) % q == 0:
        k = m + (n - m * p) // q
        print(k)
        for i in range(m):
            print(s[p * i: p * (i + 1)])
        for i in range(k - m):
            print(s[p * m + q * i: p * m + q * (i + 1)])
        break
    m += 1
else:
    print(-1)


def main():
    n, p, q = list(map(int, input().split()))
    s = input()

    for i in range(0, n + 1):
        for j in range(0, n + 1):
            if p * i + q * j == n:
                print(i + j)
                for k in range(i):
                    print(s[:p])
                    s = s[p:]
                for k in range(j):
                    print(s[:q])
                    s = s[q:]
                return 0

    print(-1)
    return 0

main()


import sys
# fin = open("ecr4a.in", "r")
fin = sys.stdin

n, p, q = map(int, fin.readline().split())
s = fin.readline().rstrip()


kp, kq = None, None
for i in range(0, n // p + 1):
    if not (n - i*p) % q:
        kp, kq = i, (n - i*p) // q
        break
else:
    print(-1)
    return

print(kp+kq)
cpos, m = 0, p*kp
while (cpos < m):
    print(s[cpos:cpos + p])
    cpos += p
while (cpos < n):
    print(s[cpos:cpos + q])
    cpos += q

import sys
if False:
	inp = open('A.txt', 'r')
else:
	inp = sys.stdin

n, p, q = list(map(int, inp.readline().split()))
string = inp.readline().strip()

length = n
ans = -1
for i in range(n//p + 1):
	length = n-p*i
	if length%q == 0:
		ans = i
		break
if ans == -1:
	print(-1)
else:
	print(ans + length//q)
	for i in range(ans):
		print(string[:p])
		string = string[p:]
	for i in range(length//q):
		print(string[:q])
		string = string[q:]






n, p, q = map(int, input().split())
s = input()
for i in range(n // p + 1):
    if (n - i * p) % q == 0:
        print(i + (n - i * p) // q)
        for j in range(i):
            print(s[j * p:j * p + p])
        for j in range((n - i * p) // q):
            print(s[i * p + j * q: i * p + j * q + q])
        return
print(-1)