#include<bits/stdc++.h>

using namespace std;
string c1, c2;
int a1, a2;
int main(){

cin >> c1 >> c2 >> a1 >> a2;


if(a1 == a2){
    for(int i = 1; i <= a1; i++){

    cout << c1 << c2;


    }
}

if(a1 - a2 > 1){

    cout << "nemoguce" << endl;
}

if(a2 - a1 > 1){

    cout << "nemoguce" << endl;
}

if(a1 - a2 == 1){
    int x = (a1 + a2) / 2;

        for(int j = 1; j<=x; j++){

cout << c1 << c2;

        }
       cout << c1 << endl;
}

if(a2 - a1 == 1){
    int y = (a2 + a1) / 2;

        for(int h = 1; h<=y; h++){

cout << c2 << c1;

        }
       cout << c2 << endl;
}


return 0;
}