#include <iostream>
#include <cstdio>
using namespace std;

int main() {

    char c1, c2;
    int a1, a2;
    scanf("%c0", &c1);
    scanf("%c0", &c2);
    scanf("%i1", &a1);
    scanf("%i1", &a2);

    if(c1==c2) {
        cout << "nemoguce";
    }
    else if(a1-a2>=2 || a1-a2<=-2) {
        cout << "nemoguce";
    }
    else {
        for(int i = 0; i<a1+a2; i++){
            if(i%2==0 && a1>=a2) {
                cout << c1;
            }
            else if(i%2==0 && a2>a1) {
                cout << c2;
            }
            else if (i%2==1 && a1>=a2) {
                cout << c2;
            }
            else {
                cout << c1;
            }
        }
    }

    return 0;
}