#include<bits/stdc++.h>

using namespace std;

int main(){
    char a, b;
    int a1, b1;
    cin>>a>>b>>a1>>b1;
    if(abs(a1-b1)>1){
        cout<<"nemoguce"<<endl;
        return 0;
    }
    string s = "";
    for(int i = 0;i<(a1+b1);i++){
        s+='x';
    }
    for(int i = 0;i<(a1+b1);i+=2){
        s[i] = a;
    }
    for(int j = 1;j<(a1+b1);j+=2){
        s[j] = b;
    }
    cout<<s<<endl;
    return 0;
}