#include <iostream>

using namespace std;

int main()
{
    char c1, c2;
    int a1,a2,i,j,m,n;
    cin>>c1>>c2;
    cin>>a1>>a2;
    if(a2>a1)
        j=a2;
    else
        j=a1;
    m=a1;
    n=a2;
    for(i=0;i<j;i++)
    {
        m--;
        n--;
    }
    if(m>=0&&n>=0)
        for(i=0;i<j;i++)
        {
            cout<<c1<<c2;
        }
    else
        cout<<"nemoguce";
    return 0;
}