using System;

namespace Takmicenje
{
    class Program
    {
        static void Main(string[] args)
        {
            string slova = Console.ReadLine();
            char a = slova[0];
            char b = slova[1];
            string[] br_slova = Console.ReadLine().Split();
            int bra = int.Parse(br_slova[0]);
            int brb = int.Parse(br_slova[1]);
            
            
            string rec;
            if (brb == bra || bra + 1 == brb || brb + 1 == bra)
            {
                
                Console.WriteLine((char)('a' * bra + 'b' * brb));
            }
            else
            {
                Console.WriteLine("nemoguce");
            }
        }
    }
}