#include <iostream>

using namespace std;

int main(void)
{
    ios::sync_with_stdio(false);
    cout.tie(0);

    char c1, c2;
    int a1, a2;
    string res = "nemoguce";

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

    if(a1 - a2 > 1 || a1 - a2 < -1)
        cout << res << "\n";
    else if(a2 > a1)
    {
        res = "";
        
        for(int i = 0; i < a1; i++)
        {
            res += c2;
            res += c1;
        }
        res += c2;

        cout << res << "\n";
    }
    else
    {
        res = "";
        
        for(int i = 0; i < a2; i++)
        {
            res += c1;
            res += c2;
        }
        res += c1;

        cout << res << "\n";
    }

    return 0;
}