using System;

namespace drugizadatak
{
    class Program
    {
        static void Main(string[] args)
        {
            string h = Console.ReadLine();
            string[] pds = Console.ReadLine().Split();
            int ps = int.Parse(pds[0]);
            int ds = int.Parse(pds[1]);
            if(ps == ds)
            {
                for (int i = 0; i < ps; i++) 
                Console.Write(h);
            }
            else if (Math.Abs(ps - ds) >= 2) 
            Console.Write("Nije Moguce");

            else if(ps > ds)
            {
                for (int j = 0; j < ds; j++) 
                Console.Write(h);
                Console.Write(h[0]);
            }
            else if(ds > ps)
            {
                for (int a = 0; a < ps; a++) 
                Console.Write(h);
                Console.Write(h[0]);
            }
        }
    }
}