#include <iostream>
#include <cstring>

using namespace std;

int main()
{   char x,y;
    cin>>x>>y;
    string s;
    int a,b;
    cin>>a>>b;
    if(a!=b){
        cout<<"Nemoguce"<<endl;
    }
    else {
        for(int i=0;i<2*a;i++){
            if(i%2==0){
                s[i]=x;
            }else s[i]=y;
    }
    }
    for(int i=0;i<2*a;i++){
        cout<<s[i];
    }




 return 0;
}