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