using System;
class Program
    {
        static void Main(string[] args)
        {
            int result = 0;
            {
                string[] input = Console.In.ReadToEnd().Split(new char[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
                int changed = int.MinValue;
                for (int i = 0, lim = input[1].Length - 1; i < lim; i++)
                {
                    if(input[1][i]!=input[2][i])
                    {
                        result++;
                        if (input[1][i + 1] != input[2][i + 1] && input[1][i] != input[1][i + 1]) changed=i++;
                    }
                }
                if (input[1][input[1].Length - 1] != input[2][input[2].Length - 1] && changed<input[1].Length-2) result++;
            }
            Console.WriteLine(result);
        }
    }


using System;
using System.Linq;
using System.Collections.Generic;
using System.Diagnostics;
using Debug = System.Diagnostics.Trace;
using SB = System.Text.StringBuilder;
using System.Numerics;
using static System.Math;
using static System.Console;
namespace Program
{
    public class Solver
    {
        Random rnd = new Random();
        public void Solve()
        {
            var n = ri;
            var s = rs + "$";
            var t = rs + "$";
            var ans = 0;
            for (int i = 0; i < n; i++)
            {
                if (s[i] == t[i]) continue;
                if (s[i]!=s[i+1] && s[i + 1] != t[i + 1])
                {
                    ans++;
                    i++;
                }
                else ans++;
            }
            Console.WriteLine(ans);
        }
        const long INF = 1L << 60;
        static int[] dx = { -1, 0, 1, 0 };
        static int[] dy = { 0, 1, 0, -1 };
        int ri { get { return sc.Integer(); } }
        long rl { get { return sc.Long(); } }
        double rd { get { return sc.Double(); } }
        string rs { get { return sc.Scan(); } }
        public IO.StreamScanner sc = new IO.StreamScanner(Console.OpenStandardInput());

        static T[] Enumerate<T>(int n, Func<int, T> f)
        {
            var a = new T[n];
            for (int i = 0; i < n; ++i) a[i] = f(i);
            return a;
        }
        static public void Swap<T>(ref T a, ref T b) { var tmp = a; a = b; b = tmp; }
    }
}

#region main
static class Ex
{
    static public string AsString(this IEnumerable<char> ie) { return new string(ie.ToArray()); }
    static public string AsJoinedString<T>(this IEnumerable<T> ie, string st = " ")
    {
        return string.Join(st, ie);
    }
    static public void Main()
    {
        Console.SetOut(new Program.IO.Printer(Console.OpenStandardOutput()) { AutoFlush = false });
        var solver = new Program.Solver();
        solver.Solve();
        Console.Out.Flush();
    }
}
#endregion
#region Ex
namespace Program.IO
{
    using System.IO;
    using System.Text;
    using System.Globalization;

    public class Printer : StreamWriter
    {
        public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }
        public Printer(Stream stream) : base(stream, new UTF8Encoding(false, true)) { }
    }

    public class StreamScanner
    {
        public StreamScanner(Stream stream) { str = stream; }

        public readonly Stream str;
        private readonly byte[] buf = new byte[1024];
        private int len, ptr;
        public bool isEof = false;
        public bool IsEndOfStream { get { return isEof; } }

        private byte read()
        {
            if (isEof) return 0;
            if (ptr >= len)
            {
                ptr = 0;
                if ((len = str.Read(buf, 0, 1024)) <= 0)
                {
                    isEof = true;
                    return 0;
                }
            }
            return buf[ptr++];
        }

        public char Char()
        {
            byte b = 0;
            do b = read(); while ((b < 33 || 126 < b) && !isEof);
            return (char)b;
        }
        public string Scan()
        {
            var sb = new StringBuilder();
            for (var b = Char(); b >= 33 && b <= 126; b = (char)read()) sb.Append(b);
            return sb.ToString();
        }
        public string ScanLine()
        {
            var sb = new StringBuilder();
            for (var b = Char(); b != '\n' && b != 0; b = (char)read()) if (b != '\r') sb.Append(b);
            return sb.ToString();
        }
        public long Long() { return isEof ? long.MinValue : long.Parse(Scan()); }
        public int Integer() { return isEof ? int.MinValue : int.Parse(Scan()); }
        public double Double() { return isEof ? double.NaN : double.Parse(Scan(), CultureInfo.InvariantCulture); }
    }
}

#endregion


using System;
using System.Linq;
using System.Collections.Generic;
using System.Diagnostics;
using Debug = System.Diagnostics.Trace;
using SB = System.Text.StringBuilder;
using System.Numerics;
using static System.Math;
using static System.Console;
namespace Program
{
    public class Solver
    {
        Random rnd = new Random();
        public void Solve()
        {
            var n = ri;
            var s = rs + "$";
            var t = rs + "$";
            var ans = 0;
            for (int i = 0; i < n; i++)
            {
                if (s[i] == t[i]) continue;
                if (s[i + 1] != t[i + 1])
                {
                    ans++;
                    i++;
                }
                else ans++;
            }
            Console.WriteLine(ans);
        }
        const long INF = 1L << 60;
        static int[] dx = { -1, 0, 1, 0 };
        static int[] dy = { 0, 1, 0, -1 };
        int ri { get { return sc.Integer(); } }
        long rl { get { return sc.Long(); } }
        double rd { get { return sc.Double(); } }
        string rs { get { return sc.Scan(); } }
        public IO.StreamScanner sc = new IO.StreamScanner(Console.OpenStandardInput());

        static T[] Enumerate<T>(int n, Func<int, T> f)
        {
            var a = new T[n];
            for (int i = 0; i < n; ++i) a[i] = f(i);
            return a;
        }
        static public void Swap<T>(ref T a, ref T b) { var tmp = a; a = b; b = tmp; }
    }
}

#region main
static class Ex
{
    static public string AsString(this IEnumerable<char> ie) { return new string(ie.ToArray()); }
    static public string AsJoinedString<T>(this IEnumerable<T> ie, string st = " ")
    {
        return string.Join(st, ie);
    }
    static public void Main()
    {
        Console.SetOut(new Program.IO.Printer(Console.OpenStandardOutput()) { AutoFlush = false });
        var solver = new Program.Solver();
        solver.Solve();
        Console.Out.Flush();
    }
}
#endregion
#region Ex
namespace Program.IO
{
    using System.IO;
    using System.Text;
    using System.Globalization;

    public class Printer : StreamWriter
    {
        public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }
        public Printer(Stream stream) : base(stream, new UTF8Encoding(false, true)) { }
    }

    public class StreamScanner
    {
        public StreamScanner(Stream stream) { str = stream; }

        public readonly Stream str;
        private readonly byte[] buf = new byte[1024];
        private int len, ptr;
        public bool isEof = false;
        public bool IsEndOfStream { get { return isEof; } }

        private byte read()
        {
            if (isEof) return 0;
            if (ptr >= len)
            {
                ptr = 0;
                if ((len = str.Read(buf, 0, 1024)) <= 0)
                {
                    isEof = true;
                    return 0;
                }
            }
            return buf[ptr++];
        }

        public char Char()
        {
            byte b = 0;
            do b = read(); while ((b < 33 || 126 < b) && !isEof);
            return (char)b;
        }
        public string Scan()
        {
            var sb = new StringBuilder();
            for (var b = Char(); b >= 33 && b <= 126; b = (char)read()) sb.Append(b);
            return sb.ToString();
        }
        public string ScanLine()
        {
            var sb = new StringBuilder();
            for (var b = Char(); b != '\n' && b != 0; b = (char)read()) if (b != '\r') sb.Append(b);
            return sb.ToString();
        }
        public long Long() { return isEof ? long.MinValue : long.Parse(Scan()); }
        public int Integer() { return isEof ? int.MinValue : int.Parse(Scan()); }
        public double Double() { return isEof ? double.NaN : double.Parse(Scan(), CultureInfo.InvariantCulture); }
    }
}

#endregion


using System;

namespace CSharp
{
    public class _1037C
    {
        public static void Main()
        {
            int n = int.Parse(Console.ReadLine());
            string a = Console.ReadLine();
            string b = Console.ReadLine();

            int i = 0;
            int cost = 0;

            while (i < n)
            {
                if (a[i] == b[i])
                {
                    i++;
                }
                else if (i + 1 < n && a[i + 1] != b[i + 1])
                {
                    i += 2;
                    cost++;
                }
                else
                {
                    i++;
                    cost++;
                }
            }

            Console.WriteLine(cost);
        }
    }
}


using System;

namespace CSharp
{
    public class _1037C
    {
        public static void Main()
        {
            int n = int.Parse(Console.ReadLine());
            string a = Console.ReadLine();
            string b = Console.ReadLine();

            int i = 0;
            int cost = 0;

            while (i < n)
            {
                if (a[i] == b[i])
                {
                    i++;
                }
                else if (i + 1 < n && a[i] != a[i + 1] && b[i] != b[i + 1])
                {
                    i += 2;
                    cost++;
                }
                else
                {
                    i++;
                    cost++;
                }
            }

            Console.WriteLine(cost);
        }
    }
}


using System;

public class Program
{
	public static void Main()
	{
		long n = Convert.ToInt64(Console.ReadLine());
		string a = Console.ReadLine();
		string b = Console.ReadLine();
		int otv=0;
		for(int i =0;i<a.Length;i++)
		{
			if(a[i]!=b[i])
			{
				if(i<n-1) if(a[i+1]!=b[i+1]) i++;
				otv++;
			}
		}

		Console.WriteLine(otv);
	}
}


using System;

public class Program
{
	public static void Main()
	{
		long n = Convert.ToInt64(Console.ReadLine());
		string a = Console.ReadLine();
		string b = Console.ReadLine();
		int otv=0;
		for(int i =0;i<n;i++)
		{
			if(a[i]!=b[i])
			{
				if(i<n-1) if(a[i+1]==b[i]&&b[i+1]==a[i]) i++;
				otv++;
			}
		}

		Console.WriteLine(otv);
	}
}


using System;

public class Program
{
	public static void Main()
	{
		long n = Convert.ToInt64(Console.ReadLine());
		string a = Console.ReadLine();
		string b = Console.ReadLine();
		string str = "";
		for(int i =0;i<n;i++)
		{
			if(a.Substring(i,i+1)!=b.Substring(i,i+1)) str+=b.Substring(i,i+1);
		}
		str = str.Replace("01","2").Replace("10","3");
		Console.WriteLine(str.Length);
	}
}


using System;

public class Program
{
	public static void Main()
	{
		long n = Convert.ToInt64(Console.ReadLine());
		string a = Console.ReadLine();
		string b = Console.ReadLine();
		int otv=0;
		for(int i =0;i<n;i++)
		{
			if(a[i]!=b[i])
			{
				if(i<n-1) if(a[i+1]!=b[i+1]) i++;
				otv++;
			}
		}

		Console.WriteLine(otv);
	}
}


using System;

public class Program
{
	public static void Main()
	{
		long n = Convert.ToInt64(Console.ReadLine());
		string a = Console.ReadLine();
		string b = Console.ReadLine();
		string str = "";
		for(int i =0;i<n;i++)
		{
			if(a[i]!=b[i]) str += b[i];
			if(i<n-1) if(a[i+1]!=b[i+1]) str += " ";
		}
		Console.WriteLine(str.Replace("0 1","2").Replace("1 0","3").Replace(" ","").Length);
	}
}


using System;

public class Program
{
	public static void Main()
	{
		long n = Convert.ToInt64(Console.ReadLine());
		string a = Console.ReadLine();
		string b = Console.ReadLine();
		string str = "";
		for(int i =0;i<n;i++)
		{
			if(a.Substring(i)!=b.Substring(i)) str+=b.Substring(i);
		}
		str = str.Replace("01","2").Replace("10","3");
		Console.WriteLine(str.Length);
	}
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace C
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine());
            int[] A = Array.ConvertAll<char, int>(Console.ReadLine().ToCharArray(), Convert.ToInt32);
            int[] B = Array.ConvertAll<char, int>(Console.ReadLine().ToCharArray(), Convert.ToInt32);
            int[] C = new int[n];
            int T = 0;
            for (int i = 0; i < n; i++)
            {
                C[i] = A[i] - B[i];
            }

            for (int i = 0; i < n - 1; i++)
            {
                if (C[i] == 1 && C[i + 1] == -1 || C[i] == -1 && C[i + 1] == 1)
                {
                    C[i] = 0;
                    C[i + 1] = 0;
                    T++;
                }
            }
            for (int i = 0; i < n ; i++)
            {
                T += Math.Abs(C[i]);
            }
            Console.WriteLine(T);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DobitsaRavenstava
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string a = Console.ReadLine();
            string b = Console.ReadLine();

            var i = 0;
            var cost = 0;
            while (i<n)
            {
                if (a[i] != b[i])
                {
                    if (i < n - 1 && a[i] == b[i + 1] && a[i + 1] == b[i]) i++;
                    cost++;
                }
                i++;
            }
            Console.WriteLine(cost);
        }
    }
}


using System;
using System.IO;
using System.Text;

namespace Equalize
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            writer.WriteLine(Solve(args));
            writer.Flush();
        }

        private static int Solve(string[] args)
        {
            string s = reader.ReadLine();
            s = reader.ReadLine();
            string t = reader.ReadLine();

            int ans = 0;
            int n = s.Length;
            for (int i = 0; i < n; i++)
            {
                if (s[i] == t[i])
                    continue;
                ans++;
                if (i + 1 < n && s[i + 1] != s[i] && s[i] == t[i + 1])
                {
                    i++;
                }
            }

            return ans;
        }
    }
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Numerics;

namespace CodeforcesTasks
{
    internal class Program
    {
        public static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var a = Console.ReadLine();
            var b = Console.ReadLine();

            var result = 0;

            for (int i = 0; i < n; i++)
            {
                if (a[i] == b[i])
                    continue;

                if  (i < n - 1)
                {
                    if (a[i] == b[i + 1] && a[i + 1] == b[i])
                    {
                        i++;
                    }
                }

                result++;
            }
            Console.WriteLine(result);
        }
    }
}


using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
class Solve{
    public Solve(){}
    StringBuilder sb;
    ReadData re;
    public static int Main(){
        new Solve().Run();
        return 0;
    }
    void Run(){
        sb = new StringBuilder();
        re = new ReadData();
        Calc();
        Console.Write(sb.ToString());
    }
    void Calc(){
        int N = re.i();
        string S1 = re.s();
        string S2 = re.s();
        int state = 0;
        int count = 0;
        for(int i=0;i<N;i++){
            if(S1[i] == S2[i]){
                state = 0;
            }
            else if(S1[i] == '0'){
                if(state == 2){
                    state = 0;
                }
                else{
                    count++;
                    state = 1;
                }
            }
            else{
                if(state == 1){
                    state = 0;
                }
                else{
                    count++;
                    state = 2;
                }
            }
        }
        sb.Append(count+"\n");
    }
}
class ReadData{
    string[] str;
    int counter;
    public ReadData(){
        counter = 0;
    }
    public string s(){
        if(counter == 0){
            str = Console.ReadLine().Split(' ');
            counter = str.Length;
        }
        counter--;
        return str[str.Length-counter-1];
    }
    public int i(){
        return int.Parse(s());
    }
    public long l(){
        return long.Parse(s());
    }
    public double d(){
        return double.Parse(s());
    }
    public int[] ia(int N){
        int[] ans = new int[N];
        for(int j=0;j<N;j++){
            ans[j] = i();
        }
        return ans;
    }
    public int[] ia(){
        str = Console.ReadLine().Split(' ');
        counter = 0;
        int[] ans = new int[str.Length];
        for(int j=0;j<str.Length;j++){
            ans[j] = int.Parse(str[j]);
        }
        return ans;
    }
    public long[] la(int N){
        long[] ans = new long[N];
        for(int j=0;j<N;j++){
            ans[j] = l();
        }
        return ans;
    }
    public long[] la(){
        str = Console.ReadLine().Split(' ');
        counter = 0;
        long[] ans = new long[str.Length];
        for(int j=0;j<str.Length;j++){
            ans[j] = long.Parse(str[j]);
        }
        return ans;
    }
    public double[] da(int N){
        double[] ans = new double[N];
        for(int j=0;j<N;j++){
            ans[j] = d();
        }
        return ans;
    }
    public double[] da(){
        str = Console.ReadLine().Split(' ');
        counter = 0;
        double[] ans = new double[str.Length];
        for(int j=0;j<str.Length;j++){
            ans[j] = double.Parse(str[j]);
        }
        return ans;
    }
    public List<int>[] g(int N,int[] f,int[] t){
        List<int>[] ans = new List<int>[N];
        for(int j=0;j<N;j++){
            ans[j] = new List<int>();
        }
        for(int j=0;j<f.Length;j++){
            ans[f[j]].Add(t[j]);
            ans[t[j]].Add(f[j]);
        }
        return ans;
    }
    public List<int>[] g(int N,int M){
        List<int>[] ans = new List<int>[N];
        for(int j=0;j<N;j++){
            ans[j] = new List<int>();
        }
        for(int j=0;j<M;j++){
            int f = i()-1;
            int t = i()-1;
            ans[f].Add(t);
            ans[t].Add(f);
        }
        return ans;
    }
    public List<int>[] g(){
        int N = i();
        int M = i();
        List<int>[] ans = new List<int>[N];
        for(int j=0;j<N;j++){
            ans[j] = new List<int>();
        }
        for(int j=0;j<M;j++){
            int f = i()-1;
            int t = i()-1;
            ans[f].Add(t);
            ans[t].Add(f);
        }
        return ans;
    }
}
public static class Define{
    public const long mod = 1000000007;
}
public static class Debug{
    public static void Print(double[,,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                for(int l=0;l<k.GetLength(2);l++){
                    Console.Write(k[i,j,l]+" ");
                }
                Console.WriteLine();
            }
            Console.WriteLine();
        }
    }
    public static void Print(double[,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                Console.Write(k[i,j]+" ");
            }
            Console.WriteLine();
        }
    }
    public static void Print(double[] k){
        for(int i=0;i<k.Length;i++){
            Console.WriteLine(k[i]);
        }
    }
    public static void Print(long[,,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                for(int l=0;l<k.GetLength(2);l++){
                    Console.Write(k[i,j,l]+" ");
                }
                Console.WriteLine();
            }
            Console.WriteLine();
        }
    }
    public static void Print(long[,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                Console.Write(k[i,j]+" ");
            }
            Console.WriteLine();
        }
    }
    public static void Print(long[] k){
        for(int i=0;i<k.Length;i++){
            Console.WriteLine(k[i]);
        }
    }
    public static void Print(int[,,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                for(int l=0;l<k.GetLength(2);l++){
                    Console.Write(k[i,j,l]+" ");
                }
                Console.WriteLine();
            }
            Console.WriteLine();
        }
    }
    public static void Print(int[,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                Console.Write(k[i,j]+" ");
            }
            Console.WriteLine();
        }
    }
    public static void Print(int[] k){
        for(int i=0;i<k.Length;i++){
            Console.WriteLine(k[i]);
        }
    }
}


using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class TEST{
	static void Main(){
		Sol mySol =new Sol();
		mySol.Solve();
	}
}

class Sol{
	public void Solve(){

		if(N == 1){
			Console.WriteLine(S[0] == S[1] ? 0 : 1);
			return;
		}

		int[] dp = new int[N+1];
		for(int i=0;i<N;i++){
			dp[i+1] = Math.Max(dp[i+1], dp[i]);
			if(i+1<N){
				if(S[0][i] == '1' && S[0][i+1] == '0' && S[1][i] == '0' && S[1][i+1] == '1'){
					dp[i+2] = Math.Max(dp[i+2], dp[i] + 1);
				}
				if(S[1][i] == '1' && S[1][i+1] == '0' && S[0][i] == '0' && S[0][i+1] == '1'){
					dp[i+2] = Math.Max(dp[i+2], dp[i] + 1);
				}
			}
		}

		int di = 0;
		for(int i=0;i<N;i++){
			if(S[0][i] != S[1][i]) di++;
		}

		int ans = dp[N] + (di - dp[N] * 2);
		Console.WriteLine(ans);

	}
	int N;
	String[] S;
	public Sol(){
		N = ri();
		S = new String[2];
		for(int i=0;i<2;i++) S[i] = rs();
	}

	static String rs(){return Console.ReadLine();}
	static int ri(){return int.Parse(Console.ReadLine());}
	static long rl(){return long.Parse(Console.ReadLine());}
	static double rd(){return double.Parse(Console.ReadLine());}
	static String[] rsa(char sep=' '){return Console.ReadLine().Split(sep);}
	static int[] ria(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>int.Parse(e));}
	static long[] rla(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>long.Parse(e));}
	static double[] rda(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>double.Parse(e));}
}


using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Numerics;
using System.Collections.Generic;
using System.Linq;
using System;

namespace bla2
{
    class Program
    {
        static void Main()
        {
            int n = int.Parse(Console.ReadLine());
            char[] a = Console.ReadLine().ToCharArray();
            char[] b = Console.ReadLine().ToCharArray();

            List<bool> diff = new List<bool>();
            for (int i = 0; i < n; i++)
            {
                diff.Add(a[i] != b[i]);
            }
            int ans = 0;
            for (int i = 0; i < diff.Count; i++)
            {
                if (diff[i])
                {
                    ans++;
                    if (i + 1 < diff.Count && diff[i + 1] && a[i] != a[i+1]) i++;
                }
            }
            Console.WriteLine(ans);
        }
    }
}


using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Numerics;
using System.Collections.Generic;
using System.Linq;
using System;

namespace bla2
{
    class Program
    {
        static void Main()
        {
            int n = int.Parse(Console.ReadLine());
            char[] a = Console.ReadLine().ToCharArray();
            char[] b = Console.ReadLine().ToCharArray();

            List<bool> diff = new List<bool>();
            for (int i = 0; i < n; i++)
            {
                diff.Add(a[i] != b[i]);
            }
            int ans = 0;
            for (int i = 0; i < diff.Count; i++)
            {
                if (diff[i])
                {
                    ans++;
                    if (i + 1 < diff.Count && diff[i + 1]) i++;
                }
            }
            Console.WriteLine(ans);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace cf3
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string a = Console.ReadLine();
            string b = Console.ReadLine();
            List<int> differencesA = new List<int>();
            List<int> differencesB = new List<int>();
            for (int i = 0; i < n; i++)
            {
                if (a[i] == '0' && b[i] == '1')
                    differencesA.Add(i);
                else if (a[i] == '1' && b[i] == '0')
                    differencesB.Add(i);
            }

            int cost = 0;
            for (int i = 0; i < differencesA.Count; i++)
            {
                int index = differencesA[i];
                if (differencesB.Contains(index - 1))
                {
                    differencesA.RemoveAt(i);
                    differencesB.Remove(index - 1);
                    i--;
                    cost++;
                }
                else if (differencesB.Contains(index + 1))
                {
                    differencesA.RemoveAt(i);
                    differencesB.Remove(index + 1);
                    i--;
                    cost++;
                }
            }
            Console.WriteLine(cost + differencesA.Count + differencesB.Count);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace cf3
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string a = Console.ReadLine();
            string b = Console.ReadLine();
            int cost = 0;
            bool wasA = false;
            bool wasB = false;
            for (int i = 0; i < n; i++)
            {
                if (a[i] == '0' && b[i] == '1')
                {
                    if (wasB)
                    {
                        cost++;
                        wasA = false;
                        wasB = false;
                    }
                    else if(wasA)
                        cost++;
                    else
                        wasA = true;
                }
                else if (a[i] == '1' && b[i] == '0')
                {
                    if (wasA)
                    {
                        cost++;
                        wasA = false;
                        wasB = false;
                    }
                    else if (wasB)
                        cost++;
                    else
                        wasB = true;
                }
                else if (wasB)
                {
                    cost++;
                    wasB = false;
                }
                else if (wasA)
                {
                    cost++;
                    wasA = false;
                }
            }
            if (wasA || wasB)
                cost++;
            Console.WriteLine(cost);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace cf3
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string a = Console.ReadLine();
            string b = Console.ReadLine();
            int cost = 0;
            bool wasA = false;
            bool wasB = false;
            Console.WriteLine(a);
            Console.WriteLine(b);
            for (int i = 0; i < n; i++)
            {
                if (a[i] == '0' && b[i] == '1')
                {
                    if (wasB)
                    {
                        cost++;
                        wasA = false;
                        wasB = false;
                    }
                    else
                        wasA = true;
                }
                else if (a[i] == '1' && b[i] == '0')
                {
                    if (wasA)
                    {
                        cost++;
                        wasA = false;
                        wasB = false;
                    }
                    else
                        wasB = true;
                }
                else if (wasB)
                {
                    cost++;
                    wasB = false;
                }
                else if (wasA)
                {
                    cost++;
                    wasA = false;
                }
            }
            if (wasA || wasB)
                cost++;
            Console.WriteLine(cost);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace cf3
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string a = Console.ReadLine();
            string b = Console.ReadLine();
            int cost = 0;
            bool wasA = false;
            bool wasB = false;
            for (int i = 0; i < n; i++)
            {
                if (a[i] == '0' && b[i] == '1')
                {
                    if (wasB)
                    {
                        cost++;
                        wasB = false;
                    }
                    else
                        wasA = true;
                }
                else if (a[i] == '1' && b[i] == '0')
                {
                    if (wasA)
                    {
                        cost++;
                        wasA = false;
                    }
                    else
                        wasB = true;
                }
                else if (wasB)
                {
                    cost++;
                    wasB = false;
                }
                else if (wasA)
                {
                    cost++;
                    wasA = false;
                }
            }
            if (wasA || wasB)
                cost++;
            Console.WriteLine(cost);
            Console.ReadLine();
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace cf3
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string a = Console.ReadLine();
            string b = Console.ReadLine();
            int cost = 0;
            bool wasA = false;
            bool wasB = false;
            for (int i = 0; i < n; i++)
            {
                if (a[i] == '0' && b[i] == '1')
                {
                    if (wasB)
                    {
                        cost++;
                        wasA = false;
                        wasB = false;
                    }
                    else
                        wasA = true;
                }
                else if (a[i] == '1' && b[i] == '0')
                {
                    if (wasA)
                    {
                        cost++;
                        wasA = false;
                        wasB = false;
                    }
                    else
                        wasB = true;
                }
                else if (wasB)
                {
                    cost++;
                    wasB = false;
                }
                else if (wasA)
                {
                    cost++;
                    wasA = false;
                }
            }
            if (wasA || wasB)
                cost++;
            Console.WriteLine(cost);
            Console.ReadLine();
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp5
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine());
            string a = Console.ReadLine();
            string b = Console.ReadLine();
            int s = 0;
            for(int i =0;i<n;i++)
            {
                if (a[i] != b[i])
                    if (i != n - 1)
                    {
                        if (a[i + 1] == b[i] && b[i + 1] == a[i])
                        {
                            s++; i++;
                        }
                        else s++;
                    }
                    else s++;
            }
            Console.WriteLine(s);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp5
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine());
            string a = Console.ReadLine();
            string b = Console.ReadLine();
            char[] c =  a.ToCharArray();
            int s = 0;
            for(int i =0;i<n;i++)
            {
                if (c[i] != b[i])
                    if (i != n - 1)
                    {
                        if (c[i + 1] == b[i] && b[i + 1] == c[i])
                        {
                            s++; i++;
                        }
                        else s++;
                    }
                    else s++;
            }
            Console.WriteLine(s);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections;

namespace P1967
{
	class Program
	{
		public class Global {
			public static string a;
			public static List<int> up1, down1;
		}

		static void Main(string[] args)
		{
			int len = Convert.ToInt32(Console.ReadLine()), inp;
			Global.a = Console.ReadLine();

			Global.up1 = new List<int> { };Global.down1 = new List<int> { };
			for(int i = 0;i < len;i++) {
				inp = Console.Read() - '0';
				if(inp != (Global.a[i] - '0')) {
					if(inp == 1) Global.down1.Add(i);
					else Global.up1.Add(i);
				}
			}

			int downNow = 0, cnt = 0;
			for(int upNow = 0;upNow < Global.up1.Count;upNow++) {
				if(downNow >= Global.down1.Count) { cnt++;continue; }
				while(downNow < Global.down1.Count && Global.up1[upNow] - Global.down1[downNow] >= 2) {
					cnt++; downNow++;
				}
				if(downNow < Global.down1.Count && Math.Abs(Global.down1[downNow] - Global.up1[upNow]) < 2)
					downNow++;
				cnt++;
			}

			cnt += Global.down1.Count - downNow;
			Console.WriteLine(cnt.ToString());
		}
	}
}


using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Collections;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using System.Text.RegularExpressions;
using System.Text;
using System;

class Solution
{
    static void Main(string[] args)
    {
        int n = Convert.ToInt32(Console.ReadLine());
        string a = Console.ReadLine();
        string b = Console.ReadLine();
        var c = false;
        int ans = 0;
        for (int i = 0; i < n; i++)
        {
            if (a[i] != b[i])
            {
                ans++;
                if (c)
                {
                    ans--;
                }
                c = true;
            }
            else
            {
                c = false;
            }
        }
        Console.WriteLine(ans);
    }
}


using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Collections;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using System.Text.RegularExpressions;
using System.Text;
using System;

class Solution
{
    static void Main(string[] args)
    {
        int n = Convert.ToInt32(Console.ReadLine());
        string a = Console.ReadLine();
        string b = Console.ReadLine();
        var c = false;
        int ans = 0;
        for (int i = 0; i < n; i++)
        {
            if (a[i] != b[i])
            {
                ans++;
                if (c)
                {
                    ans--;
                    c = false;
                }
                else
                    c = true;
            }
            else
            {
                c = false;
            }
        }
        Console.WriteLine(ans);
    }
}


using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Collections;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using System.Text.RegularExpressions;
using System.Text;
using System;

class Solution
{
    static void Main(string[] args)
    {
        int n = Convert.ToInt32(Console.ReadLine());
        string a = Console.ReadLine();
        string b = Console.ReadLine();
        var c = a[0] != b[0];
        int ans = a[0] != b[0] ? 1 : 0;
        for (int i = 1; i < n; i++)
        {
            if (a[i] != b[i])
            {
                ans++;
                if (c && a[i] != a[i-1])
                {
                    ans--;
                    c = false;
                }
                else
                    c = true;
            }
            else
            {
                c = false;
            }
        }
        Console.WriteLine(ans);
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Добиться_равенства
{
    class Program
    {
        static void Main(string[] args)
        {
            int ans = 0;
            int n = Convert.ToInt32(Console.ReadLine());
            int[] a = new int[n];
            int[] b = new int[n];
            string s = Console.ReadLine();
            for (int i = 0; i < n; i++)
            {
                a[i] = Convert.ToInt32(s[i]) - 48;
            }
            s = Console.ReadLine();
            for (int i = 0; i < n; i++)
            {
                b[i] = Convert.ToInt32(s[i]) - 48;
            }
            for (int i = 0; i < n - 1; i++)
            {
                if (a[i] == 0 && a[i + 1] == 1 && b[i] == 1 && b[i + 1] == 0)
                {
                    ans++;
                    a[i] = 1;
                    a[i + 1] = 0;
                }
                if (a[i] == 1 && a[i + 1] == 0 && b[i] == 0 && b[i + 1] == 1)
                {
                    ans++;
                    a[i] = 0;
                    a[i + 1] = 1;
                }
            }
            for (int i =0; i<n; i++)
            {
                if (a[i]!=b[i])
                {
                    ans++;
                    a[i] = b[i];
                }
            }
            Console.WriteLine(ans);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp19
{
    class Program
    {
        static void Main(string[] args)
        { int n = int.Parse(Console.ReadLine());
            string s1c = Console.ReadLine();
            string s2c = Console.ReadLine();
            char[] s1 = s1c.ToCharArray();
            char[] s2 = s2c.ToCharArray();

            int i = 0;
            int ans = 0;
            while (i < n)
            {
                if (i < n - 1 && s1[i] != s1[i + 1] && s1[i] == s2[i + 1] && s1[i + 1] == s2[i])
                {
                    char buff = s1[i + 1];
                    s1[i + 1] = s1[i];
                    s1[i] = buff;
                    ++ans;
                    i += 2;
                }
                else
                {
                    if (s1[i] != s2[i])
                    {
                        s1[i] = s2[i];
                        ++ans;
                    }
                    ++i;
                }
            }
            Console.WriteLine(ans);
            Console.ReadKey();

        }
    }
}


sing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp19
{
    class Program
    {
        static void Main(string[] args)
        { int n = int.Parse(Console.ReadLine());
            string s1c = Console.ReadLine();
            string s2c = Console.ReadLine();
            char[] s1 = s1c.ToCharArray();
            char[] s2 = s2c.ToCharArray();

            int i = 0;
            int ans = 0;
            while (i < n)
            {
                if (i < n - 1 && s1[i] != s1[i + 1] && s1[i] == s2[i + 1] && s1[i + 1] == s2[i])
                {
                    char buff = s1[i + 1];
                    s1[i + 1] = s1[i];
                    s1[i] = buff;
                    ++ans;
                    i += 2;
                }
                else
                {
                    if (s1[i] != s2[i])
                    {
                        s1[i] = s2[i];
                        ++ans;
                    }
                    ++i;
                }
            }
            Console.WriteLine(ans);
            ///Console.ReadKey();

        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp19
{
    class Program
    {
        static void Main(string[] args)
        { int n = int.Parse(Console.ReadLine());
            string s1c = Console.ReadLine();
            string s2c = Console.ReadLine();
            char[] s1 = s1c.ToCharArray();
            char[] s2 = s2c.ToCharArray();

            int i = 0;
            int ans = 0;
            while (i < n)
            {
                if (i < n - 1 && s1[i] != s1[i + 1] && s1[i] == s2[i + 1] && s1[i + 1] == s2[i])
                {
                    char buff = s1[i + 1];
                    s1[i + 1] = s1[i];
                    s1[i] = buff;
                    ++ans;
                    i += 2;
                }
                else
                {
                    if (s1[i] != s2[i])
                    {
                        s1[i] = s2[i];
                        ++ans;
                    }
                    ++i;
                }
            }
            Console.WriteLine(ans);
            //Console.ReadKey();

        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;

class Program
{

    #region Read Input
    static string[] lines;
    static int lineIndex = 0;

    static string ReadNextLine()
    {
#if DEBUG
        if (lines == null)
            lines = System.IO.File.ReadAllLines("input.txt");
        return lines[lineIndex++];
#else
        return Console.ReadLine();
#endif
    }
    #endregion

    static void Main(string[] args)
    {
        int n = int.Parse(ReadNextLine());
        string a = ReadNextLine();
        string b = ReadNextLine();

        long res = 0;
        for(int i = 0; i < n; i++)
        {
            if (a[i] != b[i])
            {
                if (i < n - 1 && a[i] != a[i + 1] && a[i + 1] != b[i + 1])
                {
                    i++;
                }
                res++;
            }
        }

        Console.WriteLine(string.Format("{0:d}", res));

#if DEBUG
        Console.ReadKey();
#endif
    }

}


#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>

//using namespace __gnu_pbds;
using namespace std;

typedef  long long ll;
typedef long double ld;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

#define endl "\n"
#define ioss ios::sync_with_stdio(false);cin.tie(0);
#define pb push_back
#define eb emplace_back

double startTime;
double gct()//get_current_time
{
    return ((double)clock()-startTime)/CLOCKS_PER_SEC;
}

void suraj(){
int n,a,b;cin>>n>>a>>b;
string s;cin>>s;
if(n%a==0){
    cout<<n/a<<endl;
    int c=n/a;
    for(int i=0,j=0;j<c;j++,i+=a)cout<<s.substr(i,a)<<endl;

}
else if(n%b==0){
    cout<<n/b<<endl;
    int c=n/b;
    for(int i=0,j=0;j<c;j++,i+=b)cout<<s.substr(i,b)<<endl;

}
else if(n%(a+b)==0){
    cout<<2*n/(a+b)<<endl;
    int c=n/(a+b);
    int i=0;int j=0;
    for( i=0,j=0;j<c;i+=a,j++)cout<<s.substr(i,a)<<endl;
    for(j=0;j<c;j++,i+=b)cout<<s.substr(i,b)<<endl;
}
else{
    //int d=n%(a+b);
    for(int i=0;i<101;i++){
        if((n-a*i>0)&&(n-a*i)%b==0){
            int aa=i;int bb=(n-i*a)/b;
            int ptr=0;
            cout<<aa+bb<<endl;
            for(int k=0;k<aa;k++){
                cout<<s.substr(ptr,a)<<endl;ptr+=a;
            }
            for(int k=0;k<bb;k++){
                cout<<s.substr(ptr,b)<<endl;ptr+=b;
            }
            return;
        }
        else if((n-b*i)>0&&(n-b*i)%a==0){
            int bb=i;int aa=(n-i*b)/a;
            int ptr=0;
            cout<<aa+bb<<endl;
            for(int k=0;k<bb;k++){
                cout<<s.substr(ptr,b)<<endl;ptr+=b;
            }
            for(int k=0;k<aa;k++){
                cout<<s.substr(ptr,a)<<endl;ptr+=a;
            }
            return;

        }
    }
    cout<<-1<<endl;
}

}//

int main()
{
    startTime=(double)clock();
    //freopen("input.txt","r",stdin);
    //freopen("output.txt,"w",stdout);
    //ioss
    //int t;cin>>t;while(t--)
    suraj();
    //suraj2();
    //suraj3();
    //suraj4();
    return 0;
}


#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>

//using namespace __gnu_pbds;
using namespace std;

typedef  long long ll;
typedef long double ld;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

#define endl "\n"
#define ioss ios::sync_with_stdio(false);cin.tie(0);
#define pb push_back
#define eb emplace_back

double startTime;
double gct()//get_current_time
{
    return ((double)clock()-startTime)/CLOCKS_PER_SEC;
}

void suraj(){
int n,a,b;cin>>n>>a>>b;
string s;cin>>s;
if(n%a==0){
    cout<<n/a<<endl;
    int c=n/a;
    for(int i=0,j=0;j<c;j++,i+=a)cout<<s.substr(i,a)<<endl;

}
else if(n%b==0){
    cout<<n/b<<endl;
    int c=n/b;
    for(int i=0,j=0;j<c;j++,i+=b)cout<<s.substr(i,b)<<endl;

}
else if(n%(a+b)==0){
    cout<<2*n/(a+b)<<endl;
    int c=n/(a+b);
    int i=0;int j=0;
    for( i=0,j=0;j<c;i+=a,j++)cout<<s.substr(i,a)<<endl;
    for(j=0;j<c;j++,i+=b)cout<<s.substr(i,b)<<endl;
}
else{
    //int d=n%(a+b);
    for(int i=0;i<101;i++){
        if((n-a*i)%b==0){
            int aa=i;int bb=(n-i*a)/b;
            int ptr=0;
            cout<<aa+bb<<endl;
            for(int k=0;k<aa;k++){
                cout<<s.substr(ptr,a)<<endl;ptr+=a;
            }
            for(int k=0;k<bb;k++){
                cout<<s.substr(ptr,b)<<endl;ptr+=b;
            }
            return;
        }
        else if((n-b*i)%a==0){
            int bb=i;int aa=(n-i*b)/a;
            int ptr=0;
            cout<<aa+bb<<endl;
            for(int k=0;k<bb;k++){
                cout<<s.substr(ptr,b)<<endl;ptr+=b;
            }
            for(int k=0;k<aa;k++){
                cout<<s.substr(ptr,a)<<endl;ptr+=a;
            }
            return;

        }
    }
    cout<<-1<<endl;
}

}//

int main()
{
    startTime=(double)clock();
    //freopen("input.txt","r",stdin);
    //freopen("output.txt,"w",stdout);
    //ioss
    //int t;cin>>t;while(t--)
    suraj();
    //suraj2();
    //suraj3();
    //suraj4();
    return 0;
}


#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>

//using namespace __gnu_pbds;
using namespace std;

typedef  long long ll;
typedef long double ld;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

#define endl "\n"
#define ioss ios::sync_with_stdio(false);cin.tie(0);
#define pb push_back
#define eb emplace_back

double startTime;
double gct()//get_current_time
{
    return ((double)clock()-startTime)/CLOCKS_PER_SEC;
}

void suraj(){
int n,a,b;cin>>n>>a>>b;
string s;cin>>s;
if(n%a==0){
    cout<<n/a<<endl;
    for(int i=0;i<n;i+=a)cout<<s.substr(i,a)<<endl;

}
else if(n%b==0){
    cout<<n/b<<endl;
    int c=n/b;
    for(int i=0;i<n;i+=b)cout<<s.substr(i,b)<<endl;

}
else if(n%(a+b)==0){
    cout<<2*n/(a+b)<<endl;
    int c=n/(a+b);
    int i=0;int j=0;
    for( i=0,j=0;j<c;i+=a,j++)cout<<s.substr(i,a)<<endl;
    for(j=0;j<c;j++,i+=b)cout<<s.substr(i,b)<<endl;
}
else{
    cout<<-1<<endl;
}

}//

int main()
{
    startTime=(double)clock();
    //freopen("input.txt","r",stdin);
    //freopen("output.txt,"w",stdout);
    //ioss
    //int t;cin>>t;while(t--)
    suraj();
    //suraj2();
    //suraj3();
    //suraj4();
    return 0;
}


#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>

//using namespace __gnu_pbds;
using namespace std;

typedef  long long ll;
typedef long double ld;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

#define endl "\n"
#define ioss ios::sync_with_stdio(false);cin.tie(0);
#define pb push_back
#define eb emplace_back

double startTime;
double gct()//get_current_time
{
    return ((double)clock()-startTime)/CLOCKS_PER_SEC;
}

void suraj(){
int n,a,b;cin>>n>>a>>b;
string s;cin>>s;
if(n%a==0){
    cout<<n/a<<endl;
    for(int i=0;i<n;i+=a)cout<<s.substr(i,a)<<endl;

}
else if(n%b==0){
    cout<<n/b<<endl;
    int c=n/b;
    for(int i=0;i<n;i+=b)cout<<s.substr(i,b)<<endl;

}
else if(n%(a+b)==0){
    cout<<n/(a+b)<<endl;
    int c=n/(a+b);
    int i=0;int j=0;
    for( i=0,j=0;j<c;i+=a,j++)cout<<s.substr(i,a)<<endl;
    for(j=0;j<c;j++,i+=b)cout<<s.substr(i,b)<<endl;
}
else{
    cout<<-1<<endl;
}

}//

int main()
{
    startTime=(double)clock();
    //freopen("input.txt","r",stdin);
    //freopen("output.txt,"w",stdout);
    //ioss
    //int t;cin>>t;while(t--)
    suraj();
    //suraj2();
    //suraj3();
    //suraj4();
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base:: sync_with_stdio(false),cin.tie(0),cout.tie(0);
typedef long long int ll;

int main()
{
   ll n,l,r;
   cin>>n>>l>>r;
   string a;
   cin>>a;
   if(n%(l+r)==0)
   {
       ll temp=n/(l+r),cnt=0;
       cout<<2*temp<<endl;
       for(ll i=0;i<temp;i++)
       {
            for(ll j=0;j<l;j++)
              {cout<<a[cnt]; cnt++;}
             cout<<endl;
            for(ll j=0;j<r;j++)
            {  cout<<a[cnt];cnt++;}
            cout<<endl;
       }
   }
   else if(n%l==0)
   {
       ll temp=n/l,cnt=0;
       cout<<temp<<endl;
       for(ll i=0;i<temp;i++)
       {
       for(ll j=0;j<l;j++)
       {  cout<<a[cnt];cnt++;}
       cout<<endl;}
   }
   else if(n%r==0)
   {
       ll temp=n/r,cnt=0;
       cout<<temp<<endl;
       for(ll i=0;i<temp;i++){
       for(ll j=0;j<r;j++)
       {  cout<<a[cnt];cnt++;}
       cout<<endl;}
   }
   else
    {
        ll temp=n/(l+r);
        ll temp1=n%(l+r);
        if(temp1%l== 0 || temp1%r==0)
        {
            ll cnt=0;
            if(temp1%l==0)
            {
                temp1=temp1/l;
                cout<<(2*temp)+(temp1)<<endl;
                for(ll i=0;i<temp;i++)
                {
                for(ll j=0;j<l;j++)
                  {cout<<a[cnt]; cnt++;}
                 cout<<endl;
                for(ll j=0;j<r;j++)
                {  cout<<a[cnt];cnt++;}
                cout<<endl;
                 }
                 for(ll i=0;i<temp1;i++)
                 {
                   for(ll j=0;j<l;j++)
                   {  cout<<a[cnt];cnt++;}
                   cout<<endl;}
            }
            else
            {
                temp1=temp1/r;
                cout<<(2*temp)+(temp1)<<endl;
                for(ll i=0;i<temp;i++)
                {
                for(ll j=0;j<l;j++)
                  {cout<<a[cnt]; cnt++;}
                 cout<<endl;
                for(ll j=0;j<r;j++)
                {  cout<<a[cnt];cnt++;}
                cout<<endl;
                 }
                 for(ll i=0;i<temp1;i++)
                 {
                   for(ll j=0;j<r;j++)
                   {  cout<<a[cnt];cnt++;}
                   cout<<endl;}
            }
         }
        else
           cout<<"-1";

    }

}


#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base:: sync_with_stdio(false),cin.tie(0),cout.tie(0);
typedef long long int ll;

int main()
{
   ll n,l,r;
   cin>>n>>l>>r;
   string a;
   cin>>a;
   if(n%l==0)
   {
       ll temp=n/l,cnt=0;
       cout<<temp<<endl;
       for(ll i=0;i<temp;i++)
       {
       for(ll j=0;j<l;j++)
       {  cout<<a[cnt];cnt++;}
       cout<<endl;}

   }
   else if(n%r==0)
   {
       ll temp=n/r,cnt=0;
       cout<<temp<<endl;
       for(ll i=0;i<temp;i++){
       for(ll j=0;j<r;j++)
       {  cout<<a[cnt];cnt++;}
       cout<<endl;}
   }
   else
    {
        ll y=1;
        for(ll i=0;i<n;i++)
        {
            for(ll j=0;j<n;j++)
            {
                ll temp=l*i+r*j;
                if(temp==n)
                {
                    ll cnt=0;
                    cout<<i+j<<endl;
                    for(ll k=0;k<i;k++)
                    {
                        for(ll m=0;m<l;m++)
                         {  cout<<a[cnt];cnt++;}cout<<endl;
                    }
                    for(ll k=0;k<j;k++)
                    {
                        for(ll m=0;m<r;m++)
                         {  cout<<a[cnt];cnt++;}cout<<endl;
                    }
                    return 0;
                }
            }
        }
        if(y==1)
          cout<<-1;
    }

}


#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base:: sync_with_stdio(false),cin.tie(0),cout.tie(0);
typedef long long int ll;

int main()
{
   ll n,l,r;
   cin>>n>>l>>r;
   string a;
   cin>>a;
   if(n%(l+r)==0)
   {
       ll temp=n/(l+r),cnt=0;
       cout<<2*temp<<endl;
       for(ll i=0;i<temp;i++)
       {
            for(ll j=0;j<l;j++)
              {cout<<a[cnt]; cnt++;}
             cout<<endl;
            for(ll j=0;j<r;j++)
            {  cout<<a[cnt];cnt++;}
            cout<<endl;
       }
   }
   else if(n%l==0)
   {
       ll temp=n/l,cnt=0;
       cout<<temp<<endl;
       for(ll i=0;i<temp;i++)
       {
       for(ll j=0;j<l;j++)
       {  cout<<a[cnt];cnt++;}
       cout<<endl;}
   }
   else if(n%r==0)
   {
       ll temp=n/r,cnt=0;
       cout<<temp<<endl;
       for(ll i=0;i<temp;i++){
       for(ll j=0;j<r;j++)
       {  cout<<a[cnt];cnt++;}
       cout<<endl;}
   }
   else
     cout<<"-1";

}


#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base:: sync_with_stdio(false),cin.tie(0),cout.tie(0);
typedef long long int ll;

int main()
{
   ll n,l,r;
   cin>>n>>l>>r;
   string a;
   cin>>a;
   if(n%l==0)
   {
       ll temp=n/l,cnt=0;
       cout<<temp<<endl;
       for(ll i=0;i<temp;i++)
       {
       for(ll j=0;j<l;j++)
       {  cout<<a[cnt];cnt++;}
       cout<<endl;}

   }
   else if(n%r==0)
   {
       ll temp=n/r,cnt=0;
       cout<<temp<<endl;
       for(ll i=0;i<temp;i++){
       for(ll j=0;j<r;j++)
       {  cout<<a[cnt];cnt++;}
       cout<<endl;}
   }
   else
    {
        ll y=1;
        for(ll i=0;i<n;i++)
        {
            for(ll j=0;j<n;j++)
            {
                ll temp=l*i+r*j;
                if(temp==n)
                {
                    ll cnt=0;
                    cout<<i+j<<endl;
                    for(ll k=0;k<i;k++)
                    {
                        for(ll m=0;m<l;m++)
                         {  cout<<a[cnt];cnt++;}cout<<endl;
                    }
                    for(ll k=0;k<j;k++)
                    {
                        for(ll m=0;m<r;m++)
                         {  cout<<a[cnt];cnt++;}cout<<endl;
                    }
                    y=0;
                    break;
                }
            }
        }
        if(y==1)
          cout<<-1;
    }

}


/// BISMILLAHIR RAHMANIR RAHEEM
#include<bits/stdc++.h>
using namespace std;
#include  <stdlib.h>
#include  <vector>
#define    pi   acos(-1)
#define    ll  long long
#define    IOS            ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define    gcd(a,b)     __gcd(a,b)
#define    lcm(a,b)       (a*(b/gcd(a,b)))
#define    count_one(a) __builtin_popcount(a)// Returns the number of set bits(1) in a number(a). In long long use __builtin_popcountint(a)
#define    parity(i)    __builtin_parity(i) //even parity 0 and odd parity 1
#define    blz(a)       __builtin_clz(a) //Returns the number of leading zeroes in a number(a)
#define    btz(a)       __builtin_ctz(a) //Returns the number of trailing zeroes in a number(a)
#define    pb             push_back
#define    all(x)         x.begin(),x.end()
///..............binary..................................................................
///next_permutation(ar.begin(),ar.end());finding imidiate next big num(string)..ar are string
///ar="011"//next_permutation wiint be "101";
///next_permutation(vec.begin(),vec.end()); // Find next lexicographical permutation
///..............string......................................................
///while(getline(cin,s))
///bitset<9>c(12);...cout<<c<<endl;///c=000001100 or 12 er binary value;
///convert string to intiger:int x=stoi(stringer variable name);compiler gnu 11
///convert string to intiger:long long int x=stoint(stringer variable name);compiler gnu 11
///convert string to intiger:int x=atoi(stringer variable name)//taakes character array;
///convert intiger to string:string x=to_string(intiger variable name);
///rotate(s.begin(),s.begin()+2,s.end());s="ABCD",after rotaton "CDAB"
///number of zero int x=cout(vec.begin(),vec.end(),0);///or uses bitset
///number of one int x=cout(vec.begin(),vec.end(),1);a
///string s2=s1.substr(i,x); i soho next x ti character nibe
/// cout<<fixed<<setprecision(1);
///map<int, string, greater <int> >mp; //map decending order;
///sort(v[i].begin(),v[i].end(),greater<pair<int,string>>());
///cout<<(*it).first<<" "<<(*it).second<<endl;
///mymm.insert (std::make_pair('x',10));
///…………………………vector……………………………………….
///vector< pair <int,int> > vect;//when two elements kept in vector
///vect.push_back( make_pair(x,y );
///sort(vect.begin(), vect.end());
///vect[i].first <<" "<<vec[i].second;
///auto it=find(vec.begin(),vec.end(),x);
///vec.erase(it); /// auto it=upper_bound(arr,arr+a,x);
///cout<<distance(arr,it)<<endl;
///vec.erase(unique(vec.begin(),vec.end()),vec.end());
///char x='a'-32;//==A
///string s4(3,'0');s4="000"
/*-----------------------Bitmask------------------*/
///int Set(int N,int pos){return N=N | (1<<pos);}
///int reset(int N,int pos){return N= N & ~(1<<pos);}
///bool check(int N,int pos){return (bool)(N & (1<<pos));}
/*------------------------------------------------*/
/*-------------------------------------------------*/
vector<int>vv1;
int lim=1000000;
bool prime[1000000];
void sieve()
{
    memset(prime,true,sizeof(prime));
    prime[0]=prime[1]=false;
    for(int i=2; i*i<lim; i++)
    {
        if(prime[i])
        {
            for(int j=i*i; j<lim; j=j+i)
            {
                prime[j]=false;
            }
        }
    }
    for(int i=0; i<lim; i++)
        if(prime[i])
            vv1.pb(i);
}
/*-------------------------------------------------*/
/*-------------------------------------------------*/

int main()
{
    IOS
    //sieve();
    long long tt,r=0,l=0,h=0;
    //cin>>tt;
    tt=1;
read:
    while(tt--)
    {
        vector<ll>vec2,vec1,vec,vec3,vec4,vec11;
        map<char,vector<int>>mqp;
        vector<pair<ll,ll>>ve;
        double x1,x2,x3,x4,y1,y2,y3,y4;
        ll a,d,b,n,c=0,e,cn=0,sum=0,mx2=0,mx1=0,cn1=0,cn2=0,cn3=0,cn4=0;
        string s,s3,s2;
        map<char,int>mp,mp1;
        vector<string>v;
        cin>>a>>b>>c>>s;
        ll b1=b,c1=c;
        b=max(c1,b1);
        c=min(c1,b1);
        if(a%b==0)
        {
            for(int i=0; i<a; i=i+b)
                v.pb(s.substr(i,b));
            cout<<v.size()<<endl;
            for(int i=0; i<v.size(); i++)
                cout<<v[i]<<endl;
            goto read;
        }
        else if(a%c==0)
        {
            for(int i=0; i<a; i=i+c)
                v.pb(s.substr(i,c));
            cout<<v.size()<<endl;
            for(int i=0; i<v.size(); i++)
                cout<<v[i]<<endl;
            goto read;
        }

        else
        {
            for(int k=1; k<100; k++)
            {
                if((a-(k*b))%c==0&&(a-(k*b)>0))
                {
                    for(int kk=0; kk<k*b; kk+=b){
                        v.pb(s.substr(kk,b));}
                    for(int kk=k*b; kk<a; kk+=c)
                        v.pb(s.substr(kk,c));
                    break;
                }
            }
            if(v.size()>0)
            {
                cout<<v.size()<<endl;
                for(int i=0; i<v.size(); i++)
                    cout<<v[i]<<endl;
                goto read;
            }
        }
        cout<<-1<<endl;
    }
    return 0;
}
///Alhamdulillah.......


/// BISMILLAHIR RAHMANIR RAHEEM
#include<bits/stdc++.h>
using namespace std;
#include  <stdlib.h>
#include  <vector>
#define    pi   acos(-1)
#define    ll  long long
#define    IOS            ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define    gcd(a,b)     __gcd(a,b)
#define    lcm(a,b)       (a*(b/gcd(a,b)))
#define    count_one(a) __builtin_popcount(a)// Returns the number of set bits(1) in a number(a). In long long use __builtin_popcountint(a)
#define    parity(i)    __builtin_parity(i) //even parity 0 and odd parity 1
#define    blz(a)       __builtin_clz(a) //Returns the number of leading zeroes in a number(a)
#define    btz(a)       __builtin_ctz(a) //Returns the number of trailing zeroes in a number(a)
#define    pb             push_back
#define    all(x)         x.begin(),x.end()
///..............binary..................................................................
///next_permutation(ar.begin(),ar.end());finding imidiate next big num(string)..ar are string
///ar="011"//next_permutation wiint be "101";
///next_permutation(vec.begin(),vec.end()); // Find next lexicographical permutation
///..............string......................................................
///while(getline(cin,s))
///bitset<9>c(12);...cout<<c<<endl;///c=000001100 or 12 er binary value;
///convert string to intiger:int x=stoi(stringer variable name);compiler gnu 11
///convert string to intiger:long long int x=stoint(stringer variable name);compiler gnu 11
///convert string to intiger:int x=atoi(stringer variable name)//taakes character array;
///convert intiger to string:string x=to_string(intiger variable name);
///rotate(s.begin(),s.begin()+2,s.end());s="ABCD",after rotaton "CDAB"
///number of zero int x=cout(vec.begin(),vec.end(),0);///or uses bitset
///number of one int x=cout(vec.begin(),vec.end(),1);a
///string s2=s1.substr(i,x); i soho next x ti character nibe
/// cout<<fixed<<setprecision(1);
///map<int, string, greater <int> >mp; //map decending order;
///sort(v[i].begin(),v[i].end(),greater<pair<int,string>>());
///cout<<(*it).first<<" "<<(*it).second<<endl;
///mymm.insert (std::make_pair('x',10));
///…………………………vector……………………………………….
///vector< pair <int,int> > vect;//when two elements kept in vector
///vect.push_back( make_pair(x,y );
///sort(vect.begin(), vect.end());
///vect[i].first <<" "<<vec[i].second;
///auto it=find(vec.begin(),vec.end(),x);
///vec.erase(it); /// auto it=upper_bound(arr,arr+a,x);
///cout<<distance(arr,it)<<endl;
///vec.erase(unique(vec.begin(),vec.end()),vec.end());
///char x='a'-32;//==A
///string s4(3,'0');s4="000"
/*-----------------------Bitmask------------------*/
///int Set(int N,int pos){return N=N | (1<<pos);}
///int reset(int N,int pos){return N= N & ~(1<<pos);}
///bool check(int N,int pos){return (bool)(N & (1<<pos));}
/*------------------------------------------------*/
/*-------------------------------------------------*/
vector<int>vv1;
int lim=1000000;
bool prime[1000000];
void sieve()
{
    memset(prime,true,sizeof(prime));
    prime[0]=prime[1]=false;
    for(int i=2; i*i<lim; i++)
    {
        if(prime[i])
        {
            for(int j=i*i; j<lim; j=j+i)
            {
                prime[j]=false;
            }
        }
    }
    for(int i=0; i<lim; i++)
        if(prime[i])
            vv1.pb(i);
}
/*-------------------------------------------------*/
/*-------------------------------------------------*/

int main()
{
    IOS
    //sieve();
    long long tt,r=0,l=0,h=0;
    //cin>>tt;
    tt=1;
read:
    while(tt--)
    {
        vector<ll>vec2,vec1,vec,vec3,vec4,vec11;
        map<char,vector<int>>mqp;
        vector<pair<ll,ll>>ve;
        double x1,x2,x3,x4,y1,y2,y3,y4;
        ll a,d,b,n,c=0,e,cn=0,sum=0,mx2=0,mx1=0,cn1=0,cn2=0,cn3=0,cn4=0;
        string s,s3,s2;
        map<char,int>mp,mp1;
        vector<string>v;
        cin>>a>>b>>c>>s;
        ll b1=b,c1=c;
          b=max(c1,b1);
        c=min(c1,b1);
        if(a%b==0)
        {
            for(int i=0;i<a;i=i+b)v.pb(s.substr(i,b));
        }
        else if(a%c==0)for(int i=0;i<a;i=i+c)v.pb(s.substr(i,c));

        else if(a%b==c){for(int i=0;i<a&&i+b<a;i=i+b)v.pb(s.substr(i,b));v.pb(s.substr((a/b)*b,c));}
        else if(a%c==b){for(int i=0;i<a&&i+c<a;i=i+c)v.pb(s.substr(i,c));v.pb(s.substr((a/c)*c,b));}        else if(((a/c)-1)*c==b){for(int i=0;i<a&&i+c+c<a;i=i+c)v.pb(s.substr(i,c));v.pb(s.substr(((a/c)-1)*c,b));}

        else if(b+c>a){cout<<-1<<endl;goto read;}
        else {cout<<-1<<endl;goto read;}
        cout<<v.size()<<endl;
        for(int i=0;i<v.size();i++)cout<<v[i]<<endl;
    }
    return 0;
}
///Alhamdulillah.......


/// BISMILLAHIR RAHMANIR RAHEEM
#include<bits/stdc++.h>
using namespace std;
#include  <stdlib.h>
#include  <vector>
#define    pi   acos(-1)
#define    ll  long long
#define    IOS            ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define    gcd(a,b)     __gcd(a,b)
#define    lcm(a,b)       (a*(b/gcd(a,b)))
#define    count_one(a) __builtin_popcount(a)// Returns the number of set bits(1) in a number(a). In long long use __builtin_popcountint(a)
#define    parity(i)    __builtin_parity(i) //even parity 0 and odd parity 1
#define    blz(a)       __builtin_clz(a) //Returns the number of leading zeroes in a number(a)
#define    btz(a)       __builtin_ctz(a) //Returns the number of trailing zeroes in a number(a)
#define    pb             push_back
#define    all(x)         x.begin(),x.end()
///..............binary..................................................................
///next_permutation(ar.begin(),ar.end());finding imidiate next big num(string)..ar are string
///ar="011"//next_permutation wiint be "101";
///next_permutation(vec.begin(),vec.end()); // Find next lexicographical permutation
///..............string......................................................
///while(getline(cin,s))
///bitset<9>c(12);...cout<<c<<endl;///c=000001100 or 12 er binary value;
///convert string to intiger:int x=stoi(stringer variable name);compiler gnu 11
///convert string to intiger:long long int x=stoint(stringer variable name);compiler gnu 11
///convert string to intiger:int x=atoi(stringer variable name)//taakes character array;
///convert intiger to string:string x=to_string(intiger variable name);
///rotate(s.begin(),s.begin()+2,s.end());s="ABCD",after rotaton "CDAB"
///number of zero int x=cout(vec.begin(),vec.end(),0);///or uses bitset
///number of one int x=cout(vec.begin(),vec.end(),1);a
///string s2=s1.substr(i,x); i soho next x ti character nibe
/// cout<<fixed<<setprecision(1);
///map<int, string, greater <int> >mp; //map decending order;
///sort(v[i].begin(),v[i].end(),greater<pair<int,string>>());
///cout<<(*it).first<<" "<<(*it).second<<endl;
///mymm.insert (std::make_pair('x',10));
///…………………………vector……………………………………….
///vector< pair <int,int> > vect;//when two elements kept in vector
///vect.push_back( make_pair(x,y );
///sort(vect.begin(), vect.end());
///vect[i].first <<" "<<vec[i].second;
///auto it=find(vec.begin(),vec.end(),x);
///vec.erase(it); /// auto it=upper_bound(arr,arr+a,x);
///cout<<distance(arr,it)<<endl;
///vec.erase(unique(vec.begin(),vec.end()),vec.end());
///char x='a'-32;//==A
///string s4(3,'0');s4="000"
/*-----------------------Bitmask------------------*/
///int Set(int N,int pos){return N=N | (1<<pos);}
///int reset(int N,int pos){return N= N & ~(1<<pos);}
///bool check(int N,int pos){return (bool)(N & (1<<pos));}
/*------------------------------------------------*/
/*-------------------------------------------------*/
vector<int>vv1;
int lim=1000000;
bool prime[1000000];
void sieve()
{
    memset(prime,true,sizeof(prime));
    prime[0]=prime[1]=false;
    for(int i=2; i*i<lim; i++)
    {
        if(prime[i])
        {
            for(int j=i*i; j<lim; j=j+i)
            {
                prime[j]=false;
            }
        }
    }
    for(int i=0; i<lim; i++)
        if(prime[i])
            vv1.pb(i);
}
/*-------------------------------------------------*/
/*-------------------------------------------------*/

int main()
{
    IOS
    //sieve();
    long long tt,r=0,l=0,h=0;
    //cin>>tt;
    tt=1;
read:
    while(tt--)
    {
        vector<ll>vec2,vec1,vec,vec3,vec4,vec11;
        map<char,vector<int>>mqp;
        vector<pair<ll,ll>>ve;
        double x1,x2,x3,x4,y1,y2,y3,y4;
        ll a,d,b,n,c=0,e,cn=0,sum=0,mx2=0,mx1=0,cn1=0,cn2=0,cn3=0,cn4=0;
        string s,s3,s2;
        map<char,int>mp,mp1;
        vector<string>v;
        cin>>a>>b>>c>>s;
        ll b1=b,c1=c;
          b=max(c1,b1);
        c=min(c1,b1);ll k=a%b;
        if(a%b==0)
        {
            for(int i=0;i<a;i=i+b)v.pb(s.substr(i,b));
        }
        else if(a%c==0)for(int i=0;i<a;i=i+c)v.pb(s.substr(i,c));

        else if(a%b==c){for(int i=0;i<a&&i+b<a;i=i+b)v.pb(s.substr(i,b));v.pb(s.substr((a/b)*b,c));}
        else if(a%c==b){for(int i=0;i<a&&i+c<a;i=i+c)v.pb(s.substr(i,c));v.pb(s.substr((a/c)*c,b));}
        else if(a-((a/c)-1)*c==b){for(int i=0;i<a&&i+c+c<a;i=i+c)v.pb(s.substr(i,c));v.pb(s.substr(((a/c)-1)*c,b));}
        else if(k%c==0){for(int i=0;i<a&&i+b<a;i=i+b)v.pb(s.substr(i,b));
        for(int j=(a/b)*b;j<a;j+=c)v.pb(s.substr(j,c));

        }
        else if(b+c>a){cout<<-1<<endl;goto read;}
        else {cout<<-1<<endl;goto read;}
        cout<<v.size()<<endl;
        for(int i=0;i<v.size();i++)cout<<v[i]<<endl;
    }
    return 0;
}
///Alhamdulillah.......


/// BISMILLAHIR RAHMANIR RAHEEM
#include<bits/stdc++.h>
using namespace std;
#include  <stdlib.h>
#include  <vector>
#define    pi   acos(-1)
#define    ll  long long
#define    IOS            ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define    gcd(a,b)     __gcd(a,b)
#define    lcm(a,b)       (a*(b/gcd(a,b)))
#define    count_one(a) __builtin_popcount(a)// Returns the number of set bits(1) in a number(a). In long long use __builtin_popcountint(a)
#define    parity(i)    __builtin_parity(i) //even parity 0 and odd parity 1
#define    blz(a)       __builtin_clz(a) //Returns the number of leading zeroes in a number(a)
#define    btz(a)       __builtin_ctz(a) //Returns the number of trailing zeroes in a number(a)
#define    pb             push_back
#define    all(x)         x.begin(),x.end()
///..............binary..................................................................
///next_permutation(ar.begin(),ar.end());finding imidiate next big num(string)..ar are string
///ar="011"//next_permutation wiint be "101";
///next_permutation(vec.begin(),vec.end()); // Find next lexicographical permutation
///..............string......................................................
///while(getline(cin,s))
///bitset<9>c(12);...cout<<c<<endl;///c=000001100 or 12 er binary value;
///convert string to intiger:int x=stoi(stringer variable name);compiler gnu 11
///convert string to intiger:long long int x=stoint(stringer variable name);compiler gnu 11
///convert string to intiger:int x=atoi(stringer variable name)//taakes character array;
///convert intiger to string:string x=to_string(intiger variable name);
///rotate(s.begin(),s.begin()+2,s.end());s="ABCD",after rotaton "CDAB"
///number of zero int x=cout(vec.begin(),vec.end(),0);///or uses bitset
///number of one int x=cout(vec.begin(),vec.end(),1);a
///string s2=s1.substr(i,x); i soho next x ti character nibe
/// cout<<fixed<<setprecision(1);
///map<int, string, greater <int> >mp; //map decending order;
///sort(v[i].begin(),v[i].end(),greater<pair<int,string>>());
///cout<<(*it).first<<" "<<(*it).second<<endl;
///mymm.insert (std::make_pair('x',10));
///…………………………vector……………………………………….
///vector< pair <int,int> > vect;//when two elements kept in vector
///vect.push_back( make_pair(x,y );
///sort(vect.begin(), vect.end());
///vect[i].first <<" "<<vec[i].second;
///auto it=find(vec.begin(),vec.end(),x);
///vec.erase(it); /// auto it=upper_bound(arr,arr+a,x);
///cout<<distance(arr,it)<<endl;
///vec.erase(unique(vec.begin(),vec.end()),vec.end());
///char x='a'-32;//==A
///string s4(3,'0');s4="000"
/*-----------------------Bitmask------------------*/
///int Set(int N,int pos){return N=N | (1<<pos);}
///int reset(int N,int pos){return N= N & ~(1<<pos);}
///bool check(int N,int pos){return (bool)(N & (1<<pos));}
/*------------------------------------------------*/
/*-------------------------------------------------*/
vector<int>vv1;
int lim=1000000;
bool prime[1000000];
void sieve()
{
    memset(prime,true,sizeof(prime));
    prime[0]=prime[1]=false;
    for(int i=2; i*i<lim; i++)
    {
        if(prime[i])
        {
            for(int j=i*i; j<lim; j=j+i)
            {
                prime[j]=false;
            }
        }
    }
    for(int i=0; i<lim; i++)
        if(prime[i])
            vv1.pb(i);
}
/*-------------------------------------------------*/
/*-------------------------------------------------*/

int main()
{
    IOS
    //sieve();
    long long tt,r=0,l=0,h=0;
    //cin>>tt;
    tt=1;
read:
    while(tt--)
    {
        vector<ll>vec2,vec1,vec,vec3,vec4,vec11;
        map<char,vector<int>>mqp;
        vector<pair<ll,ll>>ve;
        double x1,x2,x3,x4,y1,y2,y3,y4;
        ll a,d,b,n,c=0,e,cn=0,sum=0,mx2=0,mx1=0,cn1=0,cn2=0,cn3=0,cn4=0;
        string s,s3,s2;
        map<char,int>mp,mp1;
        vector<string>v;
        cin>>a>>b>>c>>s;
        ll b1=b,c1=c;
        b=max(c1,b1);
        c=min(c1,b1);
        if(a%b==0)
        {
            for(int i=0; i<a; i=i+b)
                v.pb(s.substr(i,b));
            cout<<v.size()<<endl;
            for(int i=0; i<v.size(); i++)
                cout<<v[i]<<endl;
            goto read;
        }
        else if(a%c==0)
        {
            for(int i=0; i<a; i=i+c)
                v.pb(s.substr(i,c));
            cout<<v.size()<<endl;
            for(int i=0; i<v.size(); i++)
                cout<<v[i]<<endl;
            goto read;
        }

        else
        {
            for(int k=1; k<100; k++)
            {
                if((a-(k*b))%c==0&&(a-(k*b)>0))
                {
                    for(int kk=0; kk<k*b; kk+=b){
                        v.pb(s.substr(kk,b));cout<<k<<endl;}
                    for(int kk=k*b; kk<a; kk+=c)
                        v.pb(s.substr(kk,c));
                    break;
                }
            }
            if(v.size()>0)
            {
                cout<<v.size()<<endl;
                for(int i=0; i<v.size(); i++)
                    cout<<v[i]<<endl;
                goto read;
            }
        }
        cout<<-1<<endl;
    }
    return 0;
}
///Alhamdulillah.......


/// BISMILLAHIR RAHMANIR RAHEEM
#include<bits/stdc++.h>
using namespace std;
#include  <stdlib.h>
#include  <vector>
#define    pi   acos(-1)
#define    ll  long long
#define    IOS            ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define    gcd(a,b)     __gcd(a,b)
#define    lcm(a,b)       (a*(b/gcd(a,b)))
#define    count_one(a) __builtin_popcount(a)// Returns the number of set bits(1) in a number(a). In long long use __builtin_popcountint(a)
#define    parity(i)    __builtin_parity(i) //even parity 0 and odd parity 1
#define    blz(a)       __builtin_clz(a) //Returns the number of leading zeroes in a number(a)
#define    btz(a)       __builtin_ctz(a) //Returns the number of trailing zeroes in a number(a)
#define    pb             push_back
#define    all(x)         x.begin(),x.end()
///..............binary..................................................................
///next_permutation(ar.begin(),ar.end());finding imidiate next big num(string)..ar are string
///ar="011"//next_permutation wiint be "101";
///next_permutation(vec.begin(),vec.end()); // Find next lexicographical permutation
///..............string......................................................
///while(getline(cin,s))
///bitset<9>c(12);...cout<<c<<endl;///c=000001100 or 12 er binary value;
///convert string to intiger:int x=stoi(stringer variable name);compiler gnu 11
///convert string to intiger:long long int x=stoint(stringer variable name);compiler gnu 11
///convert string to intiger:int x=atoi(stringer variable name)//taakes character array;
///convert intiger to string:string x=to_string(intiger variable name);
///rotate(s.begin(),s.begin()+2,s.end());s="ABCD",after rotaton "CDAB"
///number of zero int x=cout(vec.begin(),vec.end(),0);///or uses bitset
///number of one int x=cout(vec.begin(),vec.end(),1);a
///string s2=s1.substr(i,x); i soho next x ti character nibe
/// cout<<fixed<<setprecision(1);
///map<int, string, greater <int> >mp; //map decending order;
///sort(v[i].begin(),v[i].end(),greater<pair<int,string>>());
///cout<<(*it).first<<" "<<(*it).second<<endl;
///mymm.insert (std::make_pair('x',10));
///…………………………vector……………………………………….
///vector< pair <int,int> > vect;//when two elements kept in vector
///vect.push_back( make_pair(x,y );
///sort(vect.begin(), vect.end());
///vect[i].first <<" "<<vec[i].second;
///auto it=find(vec.begin(),vec.end(),x);
///vec.erase(it); /// auto it=upper_bound(arr,arr+a,x);
///cout<<distance(arr,it)<<endl;
///vec.erase(unique(vec.begin(),vec.end()),vec.end());
///char x='a'-32;//==A
///string s4(3,'0');s4="000"
/*-----------------------Bitmask------------------*/
///int Set(int N,int pos){return N=N | (1<<pos);}
///int reset(int N,int pos){return N= N & ~(1<<pos);}
///bool check(int N,int pos){return (bool)(N & (1<<pos));}
/*------------------------------------------------*/
/*-------------------------------------------------*/
vector<int>vv1;
int lim=1000000;
bool prime[1000000];
void sieve()
{
    memset(prime,true,sizeof(prime));
    prime[0]=prime[1]=false;
    for(int i=2; i*i<lim; i++)
    {
        if(prime[i])
        {
            for(int j=i*i; j<lim; j=j+i)
            {
                prime[j]=false;
            }
        }
    }
    for(int i=0; i<lim; i++)
        if(prime[i])
            vv1.pb(i);
}
/*-------------------------------------------------*/
/*-------------------------------------------------*/

int main()
{
    IOS
    //sieve();
    long long tt,r=0,l=0,h=0;
    //cin>>tt;
    tt=1;
read:
    while(tt--)
    {
        vector<ll>vec2,vec1,vec,vec3,vec4,vec11;
        map<char,vector<int>>mqp;
        vector<pair<ll,ll>>ve;
        double x1,x2,x3,x4,y1,y2,y3,y4;
        ll a,d,b,n,c=0,e,cn=0,sum=0,mx2=0,mx1=0,cn1=0,cn2=0,cn3=0,cn4=0;
        string s,s3,s2;
        map<char,int>mp,mp1;
        vector<string>v;
        cin>>a>>b>>c>>s;
        ll b1=b,c1=c;
        b=max(c1,b1);
        c=min(c1,b1);
        if(a%b==0)
        {
            for(int i=0; i<a; i=i+b)
                v.pb(s.substr(i,b));
            cout<<v.size()<<endl;
            for(int i=0; i<v.size(); i++)
                cout<<v[i]<<endl;
            goto read;
        }
        else if(a%c==0)
        {
            for(int i=0; i<a; i=i+c)
                v.pb(s.substr(i,c));
            cout<<v.size()<<endl;
            for(int i=0; i<v.size(); i++)
                cout<<v[i]<<endl;
            goto read;
        }

        else
        {
            for(int k=1; k<100; k++)
            {
                if((a-(k*b))%c==0)
                {
                    for(int kk=0; kk<k*b; kk+=b){
                        v.pb(s.substr(kk,b));}
                    for(int kk=k*b; kk<a; kk+=c)
                        v.pb(s.substr(kk,c));
                    break;
                }
            }
            if(v.size()>0)
            {
                cout<<v.size()<<endl;
                for(int i=0; i<v.size(); i++)
                    cout<<v[i]<<endl;
                goto read;
            }
        }
        cout<<-1<<endl;
    }
    return 0;
}
///Alhamdulillah.......


#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define ld long double
#define mx 200005
#define fr first
#define se second
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
int n;
void func(int a, int b, int when, string s1)
{
    int yes=0,cc=0;
    string s="";
    for(int i=0; i<n; i++){
        s+=s1[i];
        ++cc;
        if(cc%a == 0){
            cout << s << '\n';
            s="";
            yes++;
        }
        if(yes == when){
            a=b;
            yes=0;
            cc=0;
        }
    }
}

bool isOkay(int a, int b)
{
    //int h = a%b;
    if(a%b == 0) return 1;
    return 0;
}

int main()
{
   fast;
   int a,b;
   cin >> n >> a >> b;
   string s1;
   cin >> s1;
   if(n%a != 0 && n%b != 0 && !isOkay(n%a,b) && !isOkay(n%b,a)) cout << -1 << '\n';
   else{
      int Min,Max;
      Min = min(a,b);
      Max = max(a,b);

      if(n%Min == 0){
         cout << n/Min << "\n";
         func(Min,Max,n/Min,s1);
      }
      else if(n%Max == 0){
         cout << n/Max << "\n";
         func(Max,Min,n/Max,s1);
      }
      else if(n%a == b){
          cout << (n/a)+1 << "\n";
         func(a,b,n/a,s1);
      }
      else if(n%b == a){
          cout << (n/b)+1 << "\n";
         func(b,a,n/b,s1);
      }
      else if(isOkay(n%a,b)){
         int dd = n%a;
         dd/=b;
         cout << n/a+dd << "\n";
         func(a,b,n/a,s1);
      }
      else{
            int dd = n%b;
         dd/=a;
            cout << n/b+dd << "\n";
         func(b,a,n/b,s1);
      }

   }

   return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define ld long double
#define mx 200005
#define fr first
#define se second
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
int n;
void func(int a, int b, int when, string s1)
{
    int yes=0,cc=0;
    string s="";
    for(int i=0; i<n; i++){
        s+=s1[i];
        ++cc;
        if(cc%a == 0){
            cout << s << '\n';
            s="";
            yes++;
        }
        if(yes == when){
            a=b;
            yes=0;
            cc=0;
        }
    }
}

bool isOkay(int a, int b)
{
    //int h = a%b;
    if(a%b == 0) return 1;
    return 0;
}

int main()
{
   fast;
   int a,b;
   cin >> n >> a >> b;
   string s1;
   cin >> s1;
   if(n%a != 0 && n%b != 0 && !isOkay(n%a,b) && !isOkay(n%b,a)) cout << -1 << '\n';
   else{
      int Min,Max;
      Min = min(a,b);
      Max = max(a,b);

      if(n%Min == 0){
         cout << n/Min << "\n";
         func(Min,Max,n/Min,s1);
      }
      else if(n%Max == 0){
         cout << n/Max << "\n";
         func(Max,Min,n/Max,s1);
      }
      else if(n%a == b){
          cout << (n/a)+1 << "\n";
         func(a,b,n/a,s1);
      }
      else if(n%b == a){
          cout << (n/b)+1 << "\n";
         func(b,a,n/b,s1);
      }
      else if(isOkay(n%a,b)){
         cout << n/a << "\n";
         func(a,b,n/a,s1);
      }
      else{
            cout << n/b << "\n";
         func(b,a,n/b,s1);
      }

   }

   return 0;
}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

bool isOkay(int a, int b)
{
    //int h = a%b;
    if(a%b == 0) return 1;
    return 0;
}

int main(){

	int n,p,q,flag=0,i;

	cin >> n >> p >> q;
  //  if(n%p != 0 && n%q != 0 && !isOkay(n%p,q) && !isOkay(n%q,p)) flag=0;
	for( i = 0; i <= n; i += p){
		if( ( n-i ) % q == 0 ) {
			flag = 1;
			break;
		}
	}
	if(flag){
		string s;
		cin >> s;

		cout << i/p + (n-i)/q << "\n" ;
		int cc=0;
		for(int x = 0; x<i; x++){
			cc++;
			cout << s[x];
			if(cc%p == 0){
				cc=0;
				cout<<endl;
			}
		}
		cc=0;
		for(int x = i; x<n ; x++){
			cc++;
			cout << s[x];
			if(cc%q == 0){
				cc=0;
				//cout << x << " " << i << " " <<q;
				cout<<endl;
			}
		}
	}
	else
		cout<<-1;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define ld long double
#define mx 200005
#define fr first
#define se second
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
int n;
void func(int a, int b, int when, string s1)
{
    int yes=0,cc=0;
    string s="";
    for(int i=0; i<n; i++){
        s+=s1[i];
        ++cc;
        if(cc%a == 0){
            cout << s << '\n';
            s="";
            yes++;
        }
        if(yes == when){
            a=b;
            yes=0;
            cc=0;
        }
    }
}

bool isOkay(int a, int b)
{
    //int h = a%b;
    if(a%b == 0) return 1;
    return 0;
}

int main()
{
   fast;
   int a,b;
   cin >> n >> a >> b;
   string s1;
   cin >> s1;
   if(!isOkay(n%a,b) && !isOkay(n%b,a)) cout << -1 << '\n';
   else{

      if(isOkay(n%a,b)){
         int dd = n%a;
         dd/=b;
         cout << n/a+dd << "\n";
         func(a,b,n/a,s1);
      }
      else{
            int dd = n%b;
         dd/=a;
            cout << n/b+dd << "\n";
         func(b,a,n/b,s1);
      }

   }

   return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define ld long double
#define mx 200005
#define fr first
#define se second
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
int n;
void func(int a, int b, int when, string s1)
{
    int yes=0,cc=0;
    string s="";
    for(int i=0; i<n; i++){
        s+=s1[i];
        ++cc;
        if(cc%a == 0){
            cout << s << '\n';
            s="";
            yes++;
        }
        if(yes == when){
            a=b;
            yes=0;
            cc=0;
        }
    }
}

int main()
{
   fast;
   int a,b;
   cin >> n >> a >> b;
   string s1;
   cin >> s1;
   if(n%a != 0 && n%b != 0 && n%b!=a && n%a!=b) cout << -1 << '\n';
   else{
      int Min,Max;
      Min = min(a,b);
      Max = max(a,b);

      if(n%Min == 0){
         cout << n/Min << "\n";
         func(Min,Max,n/Min,s1);
      }
      else if(n%Max == 0){
         cout << n/Max << "\n";
         func(Max,Min,n/Max,s1);
      }
      else if(n%a == b){
          cout << (n/a)+1 << "\n";
         func(a,b,n/a,s1);
      }
      else if(n%b == a){
          cout << (n/b)+1 << "\n";
         func(b,a,n/b,s1);
      }

   }

   return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define ld long double
#define mx 200005
#define fr first
#define se second
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
int n;
void func(int a, int b, int when, string s1)
{
    int yes=0,cc=0;
    string s="";
    for(int i=0; i<n; i++){
        s+=s1[i];
        ++cc;
        if(cc%a == 0){
            cout << s << '\n';
            s="";
            yes++;
        }
        if(yes == when){
            a=b;
            yes=0;
            cc=0;
        }
    }
}

int main()
{
   fast;
   int a,b;
   cin >> n >> a >> b;
   string s1;
   cin >> s1;
   if(n%a != 0 && n%b != 0 && n%b!=a && n%a!=b) cout << -1 << '\n';
   else{
      if(n%a == 0){
         cout << n/a << "\n";
         func(a,b,n/a,s1);
      }
      else if(n%b == 0){
         cout << n/b << "\n";
         func(b,a,n/b,s1);
      }
      else if(n%a == b){
          cout << (n/a)+1 << "\n";
         func(a,b,n/a,s1);
      }
      else if(n%b == a){
          cout << (n/b)+1 << "\n";
         func(b,a,n/b,s1);
      }

   }

   return 0;
}


#include <bits/stdc++.h>
#include <stdlib.h>
#include<iomanip>

#define maxx 1e+5
#define PI            acos(-1.0)
#define pb            push_back
#define all(x)        (x).begin(), (x).end()
#define clr(ar)        memset(ar, 0, sizeof(ar))
#define loop(i,n)      for(int i=0; i<n; i++)
#define lop(i,n)      for(int i=1; i<=n; i++)
#define maxint(a,b,c) (a>b)?(a>c)?a:c :(b>c)?b:c
#define minint(a,b,c) (a<b)?(a<c)?a:c :(b<c)?b:c
#define READ          freopen("in.txt", "r", stdin);
#define WRITE          freopen("out.txt", "w", stdout);

#define Check(r,c) ((r>=0 && r<=7) && (c>=0 && c<=7))
#define Check(a,b,c) ((a>b)?(a>c)?a:b: (b>c)?b:c)

using namespace std;

typedef long long int ll;
typedef unsigned long long int ull;
typedef  set<int>             si;
typedef  map<string,int>      mst;
typedef  map<int,int>	      mii;
typedef  map<char,int>        mci;
typedef  map<int,string>	   mis;
typedef  vector<long long> 	   vi;
typedef  vector<string> 	   vs;

map<int,int>mp;
map<int,int>::iterator it;
ll n,i,x,y,z,j,len,cnt(0),sum=0,a,b,c,temp,d,res=0,k,tc,mod=1000003,t,r,pos,ans=0,m;
int arr[100000],ar[1000];
int dp[1000];
ll two[1000][1000];
int dx[4]= {0,0,1,-1};
int dy[4]= {1,-1,0,0};
string str,st;
queue<int>q;
vector<int>vec;
char ch;

int Bigmod(ll a,ll b,ll c)
{
  ll x;
  if(b==0) return 1%c;
  x=Bigmod(a,b/2,c);
  x=(x*x)%c;
  if(b%2)
  {
    x=(x*x*a)%c;
  }
   return x;
}

int check(int ,int)
{

}

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

  cin>>n>>x>>y;
   getchar();

  cin>>str;

  if(x+y==n)
  {
    puts("2");
    for(i=0;i<x;i++)
    {
      cout<<str[i];
    }
    cout<<endl;
    for(j=i;j<n;j++)
    {
      cout<<str[j];
    }
  }
  else if(n==(x+x))
  {
    puts("2");
    for(i=0;i<x;i++)
    {
      cout<<str[i];
    }
    cout<<endl;
    for(j=i;j<n;j++)
    {
      cout<<str[j];
    }
  }
  else if(n==(y+y))
  {
    puts("2");
    for(i=0;i<y;i++)
    {
      cout<<str[i];
    }
    cout<<endl;
    for(j=i;j<n;j++)
    {
      cout<<str[j];
    }
  }
  else if((n<(x+y)) && (n<(x+x)) && (n<(y+y))) puts("-1");

 /* else if(x==y and n%x==0)
  {
    cout<<n/x<<endl;

    for(i=0;i<n/x;i++)
    {
      cout<<str[i]<<endl;
    }

  }*/

  else if(n%x==0)
  {
     cout<<n/x<<endl;j=1;
   // for(int j=1;j<=)
    for(i=0;i<n;i++)
    {
      cout<<str[i];
      if(j%x==0) cout<<endl;
      j++;
    }
  }

 else if(n%y==0)
 {
      cout<<n/y<<endl;;j=1;
   // for(int j=1;j<=)
    for(i=0;i<n;i++)
    {
      cout<<str[i];
      if(j%y==0) {cout<<endl;}
      j++;
    }
  }
  else puts("-1");

    return 0;
  }


#include <bits/stdc++.h>
#include <stdlib.h>
#include<iomanip>

#define maxx 1e+5
#define PI            acos(-1.0)
#define pb            push_back
#define all(x)        (x).begin(), (x).end()
#define clr(ar)        memset(ar, 0, sizeof(ar))
#define loop(i,n)      for(int i=0; i<n; i++)
#define lop(i,n)      for(int i=1; i<=n; i++)
#define maxint(a,b,c) (a>b)?(a>c)?a:c :(b>c)?b:c
#define minint(a,b,c) (a<b)?(a<c)?a:c :(b<c)?b:c
#define READ          freopen("in.txt", "r", stdin);
#define WRITE          freopen("out.txt", "w", stdout);

#define Check(r,c) ((r>=0 && r<=7) && (c>=0 && c<=7))
#define Check(a,b,c) ((a>b)?(a>c)?a:b: (b>c)?b:c)

using namespace std;

typedef long long int ll;
typedef unsigned long long int ull;
typedef  set<int>             si;
typedef  map<string,int>      mst;
typedef  map<int,int>	      mii;
typedef  map<char,int>        mci;
typedef  map<int,string>	   mis;
typedef  vector<long long> 	   vi;
typedef  vector<string> 	   vs;

map<int,int>mp;
map<int,int>::iterator it;
//ll n,i,x,y,z,j,len,cnt(0),sum=0,a,b,c,temp,d,res=0,k,tc,mod=1000003,t,r,pos,ans=0,m;
int arr[100000],ar[1000];
int dp[1000];
ll two[1000][1000];
int dx[4]= {0,0,1,-1};
int dy[4]= {1,-1,0,0};
string str,st;
queue<int>q;
vector<int>vec;
//char ch;

int Bigmod(ll a,ll b,ll c)
{
  ll x;
  if(b==0) return 1%c;
  x=Bigmod(a,b/2,c);
  x=(x*x)%c;
  if(b%2)
  {
    x=(x*x*a)%c;
  }
   return x;
}

int check(int ,int)
{

}
int main()

{
  char ch[1010];
 int n,p,q,i,x,y,j,t;
 scanf("%d%d%d",&n,&p,&q);

  scanf("%s",ch);

 if(n%p==0)
 {
  printf("%d\n",n/p);

   for(i=1;i<=n;i++)
   {
     printf("%c",ch[i-1]);
     if(i%p==0) printf("\n");
   }
 }
  else if(n%q==0)
  {
   printf("%d\n",n/q); for(i=1;i<=n;i++)
    {
     printf("%c",ch[i-1]); if(i%q==0) printf("\n");
    }
  }
else
{
    t=0;
    for(i=0;i<=n;i++)
    for(j=0;j<=n;j++)
    {
      if(i*p+j*q==n)
      {
      x=i; y=j; t=1;
     break;
      }
   }
    if(!t) printf("-1\n");

  else
  { printf("%d\n",x+y);

  for(i=1;i<=x*p;i++)
  {
   printf("%c",ch[i-1]);
   if(i%p==0) printf("\n");
  }

  for(i=x*p+1;i<=n;i++)
   {
    printf("%c",ch[i-1]);
    if((i-x*p)%q==0) printf("\n");
   }
  }
}
   return 0;

}


#include <bits/stdc++.h>
#include <stdlib.h>
#include<iomanip>

#define maxx 1e+5
#define PI            acos(-1.0)
#define pb            push_back
#define all(x)        (x).begin(), (x).end()
#define clr(ar)        memset(ar, 0, sizeof(ar))
#define loop(i,n)      for(int i=0; i<n; i++)
#define lop(i,n)      for(int i=1; i<=n; i++)
#define maxint(a,b,c) (a>b)?(a>c)?a:c :(b>c)?b:c
#define minint(a,b,c) (a<b)?(a<c)?a:c :(b<c)?b:c
#define READ          freopen("in.txt", "r", stdin);
#define WRITE          freopen("out.txt", "w", stdout);

#define Check(r,c) ((r>=0 && r<=7) && (c>=0 && c<=7))
#define Check(a,b,c) ((a>b)?(a>c)?a:b: (b>c)?b:c)

using namespace std;

typedef long long int ll;
typedef unsigned long long int ull;
typedef  set<int>             si;
typedef  map<string,int>      mst;
typedef  map<int,int>	      mii;
typedef  map<char,int>        mci;
typedef  map<int,string>	   mis;
typedef  vector<long long> 	   vi;
typedef  vector<string> 	   vs;

map<int,int>mp;
map<int,int>::iterator it;
ll n,i,x,y,z,j,len,cnt(0),sum=0,a,b,c,temp,d,res=0,k,tc,mod=1000003,t,r,pos,ans=0,m;
int arr[100000],ar[1000];
int dp[1000];
ll two[1000][1000];
int dx[4]= {0,0,1,-1};
int dy[4]= {1,-1,0,0};
string str,st;
queue<int>q;
vector<int>vec;
char ch;

int Bigmod(ll a,ll b,ll c)
{
  ll x;
  if(b==0) return 1%c;
  x=Bigmod(a,b/2,c);
  x=(x*x)%c;
  if(b%2)
  {
    x=(x*x*a)%c;
  }
   return x;
}

int check(int ,int)
{

}

int main()
 {

  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  cin>>n>>x>>y;
  // getchar();

  cin>>str;

  if(x+y==n)
  {
    cout<<2<<endl;
    for(i=0;i<x;i++)
    {
      cout<<str[i];
    }
    cout<<endl;
    for(j=i;j<n;j++)
    {
      cout<<str[j];
    }
  }
  else if(n==(x+x))
  {
   cout<<2<<endl;
    for(i=0;i<x;i++)
    {
      cout<<str[i];
    }
    cout<<endl;
    for(j=i;j<n;j++)
    {
      cout<<str[j];
    }
  }
  else if(n==(y+y))
  {
   cout<<2<<endl;
    for(i=0;i<y;i++)
    {
      cout<<str[i];
    }
    cout<<endl;
    for(j=i;j<n;j++)
    {
      cout<<str[j];
    }
  }

 /* else if(x==y and n%x==0)
  {
    cout<<n/x<<endl;

    for(i=0;i<n/x;i++)
    {
      cout<<str[i]<<endl;
    }

  }*/

  else if(n%x==0)
  {
     cout<<n/x<<endl;j=1;
   // for(int j=1;j<=)
    for(i=0;i<n;i++)
    {
      cout<<str[i];
      if(j%x==0) cout<<endl;
      j++;
    }
  }

 else if(n%y==0)
 {
      cout<<n/y<<endl;j=1;
   // for(int j=1;j<=)
    for(i=0;i<n;i++)
    {
      cout<<str[i];
      if(j%y==0) {cout<<endl;}
      j++;
    }
  }
 // else if((n<(x+y)) && (n<(x+x)) && (n<(y+y))) puts("-1");
  else puts("-1");

    return 0;
  }


#include <bits/stdc++.h>
#include <stdlib.h>
#include<iomanip>

#define maxx 1e+5
#define PI            acos(-1.0)
#define pb            push_back
#define all(x)        (x).begin(), (x).end()
#define clr(ar)        memset(ar, 0, sizeof(ar))
#define loop(i,n)      for(int i=0; i<n; i++)
#define lop(i,n)      for(int i=1; i<=n; i++)
#define maxint(a,b,c) (a>b)?(a>c)?a:c :(b>c)?b:c
#define minint(a,b,c) (a<b)?(a<c)?a:c :(b<c)?b:c
#define READ          freopen("in.txt", "r", stdin);
#define WRITE          freopen("out.txt", "w", stdout);

#define Check(r,c) ((r>=0 && r<=7) && (c>=0 && c<=7))
#define Check(a,b,c) ((a>b)?(a>c)?a:b: (b>c)?b:c)

using namespace std;

typedef long long int ll;
typedef unsigned long long int ull;
typedef  set<int>             si;
typedef  map<string,int>      mst;
typedef  map<int,int>	      mii;
typedef  map<char,int>        mci;
typedef  map<int,string>	   mis;
typedef  vector<long long> 	   vi;
typedef  vector<string> 	   vs;

map<int,int>mp;
map<int,int>::iterator it;
ll n,i,x,y,z,j,len,cnt(0),sum=0,a,b,c,temp,d,res=0,k,tc,mod=1000003,t,r,pos,ans=0,m;
int arr[100000],ar[1000];
int dp[1000];
ll two[1000][1000];
int dx[4]= {0,0,1,-1};
int dy[4]= {1,-1,0,0};
string str,st;
queue<int>q;
vector<int>vec;
char ch;

int Bigmod(ll a,ll b,ll c)
{
  ll x;
  if(b==0) return 1%c;
  x=Bigmod(a,b/2,c);
  x=(x*x)%c;
  if(b%2)
  {
    x=(x*x*a)%c;
  }
   return x;
}

int check(int ,int)
{

}

int main()
 {

  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  cin>>n>>x>>y;
  // getchar();

  cin>>str;

  if(x+y==n)
  {
    cout<<2<<endl;
    for(i=0;i<x;i++)
    {
      cout<<str[i];
    }
    cout<<endl;
    for(j=i;j<n;j++)
    {
      cout<<str[j];
    }
  }
  else if(n==(x+x))
  {
   cout<<2<<endl;
    for(i=0;i<x;i++)
    {
      cout<<str[i];
    }
    cout<<endl;
    for(j=i;j<n;j++)
    {
      cout<<str[j];
    }
  }
  else if(n==(y+y))
  {
   cout<<2<<endl;
    for(i=0;i<y;i++)
    {
      cout<<str[i];
    }
    cout<<endl;
    for(j=i;j<n;j++)
    {
      cout<<str[j];
    }
  }
  else if((n<(x+y)) && (n<(x+x)) && (n<(y+y))) puts("-1");

 /* else if(x==y and n%x==0)
  {
    cout<<n/x<<endl;

    for(i=0;i<n/x;i++)
    {
      cout<<str[i]<<endl;
    }

  }*/

  else if(n%x==0)
  {
     cout<<n/x<<endl;j=1;
   // for(int j=1;j<=)
    for(i=0;i<n;i++)
    {
      cout<<str[i];
      if(j%x==0) cout<<endl;
      j++;
    }
  }

 else if(n%y==0)
 {
      cout<<n/y<<endl;;j=1;
   // for(int j=1;j<=)
    for(i=0;i<n;i++)
    {
      cout<<str[i];
      if(j%y==0) {cout<<endl;}
      j++;
    }
  }
  else puts("-1");

    return 0;
  }