#include <iostream>

int main(){
    std::ios_base::sync_with_stdio(false);

    std::string input;
    std::cin >> input;

    int a,b;
    std::cin >> a >> b;


    if (a - 1 > b || b - 1 > a){
        std::cout << "nemoguce";
        return 0;
    }

    int c;
    if (a > b) c = 0;
    else c = 1;

    std::string output;
    for (int i = 0; i < a + b; i++){
        output += input[c];

        c++;
        if (c > 1) c = 0;
    }

    std::cout << output;

    return 0;
}