#include <iostream>
#include <string>
using namespace std;
int main()
{
    unsigned short int a1,a2;

    char c[2];
    cin >> c >> a1 >> a2;
    
    string test = "";
    if(a1 > a2 || a2 > a1) 
    {
        cout << "nemoguce";
        return 1;
    }
    for(int i = 0; i < (a1+a2)/2; i++)
    {
        test.push_back(c[1]);
        test.push_back(c[0]);
    }

    cout << test;
    return 0;
}