#include <iostream>

using namespace std;

int main()
{
    char c1, c2;
    cin>>c1>>c2;
    int a1, a2;
    cin>>a1>>a2;
    if(c1 != c2){
        if (a1 == a2)
        while(a1){
            cout<<c1<<c2;
            a1--;
        }
        else
            cout<<"nemoguce";
    }
    else if(c1 == c2)
        cout<<"nemoguce";

    return 0;
}