using System;

class Program
{
    static void Main(string[] args)
    {
        try
        {
            char c1 = Convert.ToChar(Console.Read());
            char c2 = Convert.ToChar(Console.Read());
            if (c1 == c2 || Char.IsUpper(c1) == true || Char.IsUpper(c2) == true || Char.IsLetter(c1) == false || Char.IsLetter(c2) == false)
            {
                throw new ArgumentException();
            }
            Console.ReadLine();
            string numb = Console.ReadLine();
            string[] numb1 = numb.Split(' ');
            int[] a = Array.ConvertAll<string, int>(numb1, int.Parse);
            if (a[0] < 1 || a[0] > 50000 || a[1] < 1 || a[1] > 50000)
            {
                throw new Exception();
            }
            int n = a[0] + a[1];
            int b1 = 0, b2 = 0, b3 = 0, b4 = 0;
            int g1 = 0, g2 = 0;
            char[] rez = new char[n];
            char[] rez1 = new char[n];
            for (int i = 0; i < n; i++)
            {
                if (i % 2 == 0)
                {
                    rez[i] = c1;
                    b1++;
                    rez1[i] = c2;
                    b3++;
                }
                else
                {
                    rez[i] = c2;
                    b2++;
                    rez1[i] = c1;
                    b4++;
                }
                if (b1 > a[0] || b2 > a[1])
                {
                    g1++;
                }
                if (b3 > a[1] || b4 > a[0])
                {
                    g2++;
                }
            }
            if (g1 == 0)
            {
                string res = new string(rez);
                Console.WriteLine(res);
            }
            else
            {
                if (g2 == 0)
                {
                    string res = new string(rez1);
                    Console.WriteLine(res);
                }
                else
                {
                    Console.WriteLine("Nemoguce");
                }
            }
        }
        catch (FormatException)
        {

        }
        catch (ArgumentException)
        {

        }
        catch (Exception)
        {

        }
    }
}