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

class program
{
    static void Main()
    {
        string unos = Console.ReadLine();
        var s = Console.ReadLine().Split();
        int a = int.Parse(s[0]);
        int b = int.Parse(s[1]);
        StringBuilder sb = new StringBuilder();
        if (a == b || a + 1 == b || a - 1 == b)
        {
            if (a == b)
            {
                for (int i = 0; i < a; i++)
                {
                    sb.Append(unos);
                }
            }
            else if (a > b)
            {
                for (int i = 0; i < b; i++)
                {
                    sb.Append(unos);
                }
                sb.Append(unos[0]);
            }
            else
            {
                sb.Append(unos[1]);
                for (int i = 0; i < a; i++)
                {
                    sb.Append(unos);
                }
            }
            Console.WriteLine(sb.ToString());

        }
        else
        {
            Console.WriteLine("nemoguce");
        }
    }
}