#include <iostream>
#include <string>
using namespace std;
int main() {
string a,b,konacno;
int x,y;
cin>>a>>b;
cin>>x>>y;
if(x>=y+2||y>=x+2){
    cout<<"nemoguce";
}
else{
    if(x>=y){
        for(int i=0;i<x+y;i++){
            if(i%2==0){konacno+=a;}
            else{konacno+=b;}
        }
    }
    else if(y>x){
        for(int i=0;i<x+y;i++){
            if(i%2==0){konacno+=b;}
            else{konacno+=a;}
        }
    }
}
cout<<konacno;
}