#include <iostream>
using namespace std;
int main()
{
    char c1,c2,String;
    int a1,a2,i=0,a;
    cin>>c1>>c2;
    cin>>a1;
    cin>>a2;
    a=a1+a2;
    String=c1+c2;
    if (a1==a2)
    {
        while(i<a/2)
        {
            i++;
            String+=String;
        }
        cout<<String;
    }
    else
        cout<<"nemoguce";
    return 0;
}